mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
58 lines
1.1 KiB
HTML
58 lines
1.1 KiB
HTML
<button>
|
|
<span class="transition"></span>
|
|
<span class="gradient"></span>
|
|
<span class="label">Button</span>
|
|
</button>
|
|
<style>
|
|
/* From Uiverse.io by cssbuttons-io - Tags: button, ripple */
|
|
button {
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
font-size: 17px;
|
|
padding: 1em 2.7em;
|
|
font-weight: 500;
|
|
background: #1F2937;
|
|
color: white;
|
|
border: none;
|
|
position: relative;
|
|
overflow: hidden;
|
|
border-radius: 0.6em;
|
|
}
|
|
|
|
.gradient {
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
left: 0;
|
|
top: 0;
|
|
border-radius: 0.6em;
|
|
margin-top: -0.25em;
|
|
background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
|
|
}
|
|
|
|
.label {
|
|
position: relative;
|
|
top: -1px;
|
|
}
|
|
|
|
.transition {
|
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
transition-duration: 500ms;
|
|
background-color: rgba(16, 185, 129, 0.6);
|
|
border-radius: 9999px;
|
|
width: 0;
|
|
height: 0;
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
button:hover .transition {
|
|
width: 14em;
|
|
height: 14em;
|
|
}
|
|
|
|
button:active {
|
|
transform: scale(0.97);
|
|
}
|
|
</style>
|