mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
51 lines
845 B
HTML
51 lines
845 B
HTML
<label class="container">
|
|
<input type="checkbox" checked="checked">
|
|
<div class="checkmark"></div>
|
|
</label>
|
|
<style>
|
|
/* From Uiverse.io by KSAplay - Tags: checkbox */
|
|
.container input {
|
|
position: absolute;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
height: 0;
|
|
width: 0;
|
|
}
|
|
|
|
.container {
|
|
position: relative;
|
|
cursor: pointer;
|
|
font-size: 17px;
|
|
width: 2em;
|
|
height: 2em;
|
|
border-radius: 50%;
|
|
user-select: none;
|
|
border: 5px solid white;
|
|
display: block;
|
|
}
|
|
|
|
.checkmark {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.checkmark:after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 25%;
|
|
left: 25%;
|
|
background-color: white;
|
|
width: 50%;
|
|
height: 50%;
|
|
border-radius: 50%;
|
|
transform: scale(0);
|
|
transition: 100ms ease;
|
|
}
|
|
|
|
.container input:checked ~ .checkmark:after {
|
|
transform: scale(1);
|
|
}
|
|
</style>
|