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>Hover me</button>
|
|
<style>
|
|
/* From Uiverse.io by garerim - Tags: button */
|
|
button {
|
|
z-index: 2;
|
|
display: block;
|
|
width: fit-content;
|
|
height: auto;
|
|
outline: none;
|
|
border: none;
|
|
background-color: inherit;
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
padding: 10px 20px;
|
|
position: relative;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button::before {
|
|
content: "";
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 3;
|
|
position: absolute;
|
|
top: 0%;
|
|
left: 0%;
|
|
transform: scaleX(0.2) scaleY(0.5) translate(250%, 100%);
|
|
border-top: solid 2px #333;
|
|
border-left: solid 4px #333;
|
|
transition: all .4s ease-in-out;
|
|
}
|
|
|
|
button::after {
|
|
content: "";
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 3;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
transform: translate(-50%, -50%) scaleX(0.2) scaleY(0.5);
|
|
border-bottom: solid 2px #333;
|
|
border-right: solid 4px #333;
|
|
transition: all .4s ease-in-out;
|
|
}
|
|
|
|
button:hover::before {
|
|
transform: translate(0%, 0%) scaleX(1) scaleY(1);
|
|
border-top: solid 1px #333;
|
|
border-left: solid 1px #333;
|
|
}
|
|
|
|
button:hover::after {
|
|
transform: scaleX(1) scaleY(1) translate(0%, 0%);
|
|
border-bottom: solid 1px #333;
|
|
border-right: solid 1px #333;
|
|
}
|
|
</style>
|