mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
73 lines
1.6 KiB
HTML
73 lines
1.6 KiB
HTML
<div class="button">
|
|
Button<span class="button-border"></span>
|
|
</div>
|
|
<style>
|
|
/* From Uiverse.io by TaniaDou - Tags: gradient, button, modern, neon */
|
|
.button {
|
|
padding: 1rem 2rem;
|
|
border-radius: .5rem;
|
|
border: none;
|
|
font-size: 1rem;
|
|
font-weight: 400;
|
|
color: #f4f0ff;
|
|
text-align: center;
|
|
backdrop-filter: blur(10px);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.button::before {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
border-radius: .5rem;
|
|
background: linear-gradient(180deg, rgba(8, 77, 126, 0) 0%, rgba(8, 77, 126, 0.42) 100%),rgba(47,255,255,.24);
|
|
box-shadow: inset 0 0 12px rgba(151,200,255,.44);
|
|
z-index: -1;
|
|
}
|
|
|
|
.button::after {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(180deg, rgba(8, 77, 126, 0) 0%, rgba(8, 77, 126, 0.42) 100%),rgba(47,255,255,.24);
|
|
box-shadow: inset 0 0 12px rgba(151,200,255,.44);
|
|
border-radius: .5rem;
|
|
opacity: 0;
|
|
z-index: -1;
|
|
transition: all .3s ease-in;
|
|
}
|
|
|
|
.button:hover::after {
|
|
opacity: 1;
|
|
}
|
|
|
|
.button-border {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
border-radius: .5rem;
|
|
z-index: -1;
|
|
}
|
|
|
|
.button-border::before {
|
|
content: "";
|
|
position: absolute;
|
|
border-radius: .5rem;
|
|
padding: 1px;
|
|
inset: 0;
|
|
background: linear-gradient(180deg, rgba(184, 238, 255, 0.24) 0%, rgba(184, 238, 255, 0) 100%),linear-gradient(0deg, rgba(184, 238, 255, 0.32), rgba(184, 238, 255, 0.32));
|
|
-webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
|
|
-webkit-mask-composite: xor;
|
|
pointer-events: none;
|
|
}
|
|
</style>
|