mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
40 lines
708 B
HTML
40 lines
708 B
HTML
<button class="btn">Hover me !
|
|
<div class="background"></div>
|
|
</button>
|
|
<style>
|
|
/* From Uiverse.io by garerim - Tags: button */
|
|
.btn {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
font-size: 25px;
|
|
font-weight: 600;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
cursor: pointer;
|
|
background-color: inherit;
|
|
border: none;
|
|
outline: none;
|
|
color: #f1f1f1;
|
|
}
|
|
|
|
.btn:hover .background {
|
|
height: inherit;
|
|
width: 120%;
|
|
top: 50%;
|
|
}
|
|
|
|
.btn .background {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
height: 3px;
|
|
width: 100%;
|
|
background-color: #006b92;
|
|
z-index: -1;
|
|
border-radius: 5px;
|
|
transition: all 0.3s;
|
|
}
|
|
</style>
|