mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
72 lines
1.2 KiB
HTML
72 lines
1.2 KiB
HTML
<button class="button">
|
|
<span class="X"></span>
|
|
<span class="Y"></span>
|
|
<div class="close">Close</div>
|
|
</button>
|
|
<style>
|
|
/* From Uiverse.io by simontheonlyone - Source: no source link just the close button of Microsoft Windows - Tags: button, animated, click animation, close, minimal */
|
|
.button {
|
|
position: relative;
|
|
width: 6em;
|
|
height: 4em;
|
|
border: none;
|
|
background: none;
|
|
}
|
|
|
|
.X {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 33%;
|
|
width: 2em;
|
|
height: 1.5px;
|
|
background-color: #fff;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.Y {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 33%;
|
|
width: 2em;
|
|
height: 1.5px;
|
|
background-color: #fff;
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
.close {
|
|
position: absolute;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
bottom: -40%;
|
|
left: 70%;
|
|
width: 3em;
|
|
height: 1.7em;
|
|
font-size: 16px;
|
|
background-color: rgb(254, 255, 225);
|
|
color: #000;
|
|
border: 1px solid #000;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
}
|
|
|
|
.button:hover {
|
|
background-color: rgb(210, 0, 0);
|
|
}
|
|
|
|
.button:active {
|
|
background-color: rgb(130, 0, 0);
|
|
}
|
|
|
|
.button:hover > .close {
|
|
animation: close 0.2s forwards 1.25s;
|
|
}
|
|
|
|
@keyframes close {
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
</style>
|