پیش‌نمایش زنده
کد HTML
 <button style="--i:#a955ff;--j:#ea51ff;">
            <span class="icon">
              <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart" viewBox="0 0 16 16">
  <path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"></path>
</svg>
            </span>
            <span class="title">i love it</span>
        </button>
کد CSS
button {
  background-color: #fff;
  position: relative;
  list-style: none;
  width: 60px;
  height: 60px;
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
  border: none;
}

button:active {
  scale: 1.2;
}

button:hover {
  width: 180px;
  box-shadow: 0px 10px 25px rgba(0, 0, 0, 0);
}

button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(45deg, var(--i), var(--j));
  opacity: 0;
  transition: 0.5s;
}

button:hover::before {
  opacity: 1;
}

button::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 100%;
  height: 100%;
  border-radius: 60px;
  background: linear-gradient(45deg, var(--i), var(--j));
  filter: blur(15px);
  transition: 0.5s;
  z-index: -1;
  opacity: 0;
}

button:hover::after {
  opacity: 0.5;
}

button svg {
  color: #777;
  width: auto;
  height: 30px;
  transition: 0.5s;
  transition-delay: 0.25s;
}

button:hover svg {
  transform: scale(0);
  color: #fff;
  transition-delay: 0s;
}

button span {
  position: absolute;
}

button .title {
  color: #fff;
  font-size: 1.3em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: scale(0);
  transition: 0.5s;
  transition-delay: 0s;
  font-weight: 600;
}

button:hover .title {
  transform: scale(1);
  transition-delay: 0.25s;
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05