galaxy/Buttons/vinodjangid07_ordinary-swan-71.html

75 lines
1.7 KiB
HTML

<button class="button">
<svg viewBox="0 0 448 512" class="bell"><path d="M224 0c-17.7 0-32 14.3-32 32V49.9C119.5 61.4 64 124.2 64 200v33.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416H424c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6C399.5 322.9 384 278.8 384 233.4V200c0-75.8-55.5-138.6-128-150.1V32c0-17.7-14.3-32-32-32zm0 96h8c57.4 0 104 46.6 104 104v33.4c0 47.9 13.9 94.6 39.7 134.6H72.3C98.1 328 112 281.3 112 233.4V200c0-57.4 46.6-104 104-104h8zm64 352H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z"></path></svg>
Notifications
</button>
<style>
/* From Uiverse.io by vinodjangid07 - Tags: gradient, notification, button, hover effect */
.button {
width: 140px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
background: linear-gradient(to left,rgb(173, 154, 255),rgb(149, 110, 255));
border-radius: 30px;
color: rgb(255, 255, 255);
font-weight: 600;
border: none;
position: relative;
cursor: pointer;
transition-duration: .2s;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.116);
}
.bell {
width: 13px;
}
.bell path {
fill: rgb(255, 255, 255);
}
.button:hover {
background: linear-gradient(to left,rgb(154, 131, 255),rgb(135, 91, 255));
}
.button:active {
transform: scale(0.97);
transition-duration: .2s;
}
.button:hover .bell {
animation: bellRing 0.9s both;
}
/* bell ringing animation keyframes*/
@keyframes bellRing {
0%,
100% {
transform-origin: top;
}
15% {
transform: rotateZ(10deg);
}
30% {
transform: rotateZ(-10deg);
}
45% {
transform: rotateZ(5deg);
}
60% {
transform: rotateZ(-5deg);
}
75% {
transform: rotateZ(2deg);
}
}
</style>