mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
62 lines
No EOL
1 KiB
HTML
62 lines
No EOL
1 KiB
HTML
<label class="container">
|
|
<input type="checkbox" checked="checked" />
|
|
<div class="checkmark"></div>
|
|
</label>
|
|
|
|
<style>
|
|
/* From Uiverse.io by myshy13 - Tags: checkbox */
|
|
.container input {
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
display: none;
|
|
}
|
|
|
|
.container {
|
|
display: block;
|
|
position: relative;
|
|
cursor: pointer;
|
|
font-size: 20px;
|
|
user-select: none;
|
|
}
|
|
|
|
.checkmark {
|
|
transition: 0.5s ease;
|
|
border-radius: 0.2em;
|
|
}
|
|
|
|
.checkmark {
|
|
position: relative;
|
|
top: 0;
|
|
left: 0;
|
|
height: 1.3em;
|
|
width: 1.3em;
|
|
background-color: #ccc;
|
|
}
|
|
.container input:checked ~ .checkmark {
|
|
background-color: #b30000;
|
|
box-shadow: #ff2929 0px 0px 1em;
|
|
outline: rgb(139, 0, 0) 3px solid;
|
|
}
|
|
|
|
.checkmark:after {
|
|
content: "";
|
|
position: absolute;
|
|
display: none;
|
|
}
|
|
|
|
.container input:checked ~ .checkmark::after {
|
|
display: block;
|
|
}
|
|
|
|
.container .checkmark::after {
|
|
left: 0.45em;
|
|
top: 0.25em;
|
|
width: 0.25em;
|
|
height: 0.5em;
|
|
border: solid white;
|
|
border-width: 0 0.15em 0.15em 0;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
</style>
|
|
|