mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
76 lines
1.5 KiB
HTML
76 lines
1.5 KiB
HTML
<button role="button" class="button">Hover Me</button>
|
|
<style>
|
|
/* From Uiverse.io by PriyanshuGupta28 - Tags: button, hover effect, 3d button, cool button, glass button, onClick effect */
|
|
.button {
|
|
all: unset;
|
|
width: 100px;
|
|
height: 30px;
|
|
font-size: 16px;
|
|
background: transparent;
|
|
border: none;
|
|
position: relative;
|
|
color: #f0f0f0;
|
|
cursor: pointer;
|
|
z-index: 1;
|
|
padding: 10px 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
white-space: nowrap;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
touch-action: manipulation;
|
|
transition: 0.3s ease-in-out;
|
|
}
|
|
|
|
.button:hover {
|
|
box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
|
|
}
|
|
|
|
.button::after,
|
|
.button::before {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
z-index: -99999;
|
|
transition: all .4s;
|
|
}
|
|
|
|
.button::before {
|
|
transform: translate(0%, 0%);
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: #4158D0;
|
|
background-image: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.button::after {
|
|
transform: translate(10px, 10px);
|
|
width: 35px;
|
|
height: 35px;
|
|
background: #6804da2f;
|
|
backdrop-filter: blur(5px);
|
|
-webkit-backdrop-filter: blur(5px);
|
|
border-radius: 50px;
|
|
}
|
|
|
|
.button:hover::before {
|
|
transform: translate(5%, 20%);
|
|
width: 110%;
|
|
height: 110%;
|
|
}
|
|
|
|
.button:hover::after {
|
|
border-radius: 10px;
|
|
transform: translate(0, 0);
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.button:active::after {
|
|
transition: 0s;
|
|
transform: translate(0, 5%);
|
|
}
|
|
</style>
|