mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
47 lines
894 B
HTML
47 lines
894 B
HTML
<div class="checkbox-wrapper">
|
|
<label>
|
|
<input type="checkbox">
|
|
<span class="checkbox"></span>
|
|
</label>
|
|
</div>
|
|
<style>
|
|
/* From Uiverse.io by PriyanshuGupta28 - Tags: checkbox, toggle switch, cool toggle */
|
|
.checkbox-wrapper *,
|
|
.checkbox-wrapper *::before,
|
|
.checkbox-wrapper *::after {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.checkbox-wrapper label {
|
|
display: block;
|
|
width: 35px;
|
|
height: 35px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.checkbox-wrapper input {
|
|
visibility: hidden;
|
|
display: none;
|
|
}
|
|
|
|
.checkbox-wrapper input:checked ~ .checkbox {
|
|
transform: rotate(45deg);
|
|
width: 14px;
|
|
margin-left: 12px;
|
|
border-color: #000000;
|
|
border-top-color: transparent;
|
|
border-left-color: transparent;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.checkbox-wrapper .checkbox {
|
|
display: block;
|
|
width: inherit;
|
|
height: inherit;
|
|
border: 3px solid #434343;
|
|
border-radius: 6px;
|
|
transition: all 0.375s;
|
|
}
|
|
|
|
|
|
</style>
|