پیشنمایش زنده
کد HTML
<button class="hover-button">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
d="M12 2a10 10 0 100 20 10 10 0 000-20zm-1 15v-4H8l4-6v4h3l-4 6z"
></path>
</svg>
</button>
کد CSS
.hover-button {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 80px;
height: 80px;
background: linear-gradient(45deg, #ff6ec4, #7873f5);
border: none;
border-radius: 50%;
cursor: pointer;
outline: none;
transition:
transform 0.1s ease,
box-shadow 0.3s ease;
box-shadow: 0 4px 15px rgba(255, 110, 196, 0.5);
}
.hover-button:hover {
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(255, 110, 196, 0.7);
}
.hover-button svg {
width: 40px;
height: 40px;
fill: #fff;
transition: transform 0.3s ease;
}
.hover-button:hover svg {
transform: scale(1.2);
}