galaxy/Buttons/KhaledMatalkah_tough-rat-6.html

66 lines
1.2 KiB
HTML

<button class="button">
Button
</button>
<style>
/* From Uiverse.io by KhaledMatalkah - Tags: button, gradients */
.button {
display: inline-block;
padding: 15px 32px;
font-size: 17px;
font-weight: bold;
color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
border: none;
border-radius: 50px;
text-align: center;
text-decoration: none;
cursor: pointer;
position: relative;
overflow: hidden;
z-index: 1;
}
.button:before,
.button:after {
content: "";
position: absolute;
top: 0;
width: 100%;
height: 100%;
border-radius: 50px;
opacity: 0.3;
pointer-events: none;
transition: all 0.3s ease-in-out;
}
.button:before {
left: -100%;
background: linear-gradient(90deg, rgba(0, 136, 255, 0.8), rgba(255, 0, 170, 0.8), rgba(0, 136, 255, 0.8));
z-index: -1;
}
.button:hover:before {
left: 0;
}
.button:after {
right: -100%;
background: linear-gradient(270deg, rgba(0, 136, 255, 0.8), rgba(255, 0, 170, 0.8), rgba(0, 136, 255, 0.8));
z-index: -1;
}
.button:hover:after {
right: 0;
}
.button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.button:active {
transform: translateY(1px);
box-shadow: none;
}
</style>