mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
60 lines
1.2 KiB
HTML
60 lines
1.2 KiB
HTML
<button class="button">Button</button>
|
|
<style>
|
|
/* From Uiverse.io by shadowmurphy - Tags: button, hover, active */
|
|
.button {
|
|
overflow: hidden;
|
|
position: relative;
|
|
border: 1px solid #D1D1D1;
|
|
background-color: #F5F5F5;
|
|
width: 100px;
|
|
height: 30px;
|
|
user-select: none;
|
|
cursor: pointer;
|
|
border-radius: 5px;
|
|
transition: all 0.5s;
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
font-weight: bold;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.button:hover {
|
|
transform: scale(1.1);
|
|
background-color: #E8E8E8;
|
|
border-color: #BDBDBD;
|
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.button:active {
|
|
transform: scale(0.95);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.button::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%,
|
|
transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%,
|
|
transparent 75%, transparent);
|
|
opacity: 0;
|
|
animation: buttonGlow 2s linear infinite;
|
|
z-index: -1;
|
|
}
|
|
|
|
@keyframes buttonGlow {
|
|
0% {
|
|
background-position: 0 0;
|
|
}
|
|
|
|
100% {
|
|
background-position: 400% 0;
|
|
}
|
|
}
|
|
|
|
</style>
|