mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
50 lines
984 B
HTML
50 lines
984 B
HTML
<label class="container">
|
|
<input type="checkbox" checked="checked">
|
|
<div class="line"></div>
|
|
<div class="line line-indicator"></div>
|
|
</label>
|
|
<style>
|
|
/* From Uiverse.io by AbanoubMagdy1 - Tags: checkbox */
|
|
/* Hide the default checkbox */
|
|
.container input {
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.container {
|
|
display: block;
|
|
position: relative;
|
|
cursor: pointer;
|
|
font-size: 20px;
|
|
user-select: none;
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: 3px;
|
|
background: rgba(216, 216, 216, 0.603);
|
|
}
|
|
|
|
.container:hover {
|
|
background: rgba(197, 197, 197, 0.527);
|
|
}
|
|
|
|
.line {
|
|
width: calc(100% - 8px);
|
|
height: 3px;
|
|
left: 4px;
|
|
background: rgb(58, 58, 58);
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
transition: .7s transform cubic-bezier(0,1,.33,1.2), background .4s;
|
|
}
|
|
|
|
.line-indicator {
|
|
transform: translateY(-50%) rotate(90deg);
|
|
}
|
|
|
|
.container input:checked ~ .line-indicator {
|
|
transform: translateY(-50%);
|
|
}
|
|
</style>
|