galaxy/Checkboxes/PriyanshuGupta28_soft-goose-97.html

70 lines
1.5 KiB
HTML

<div class="checkbox-wrapper">
<label class="container">
<input type="checkbox" checked="checked">
<div class="checkmark"></div>
</label>
</div>
<style>
/* From Uiverse.io by PriyanshuGupta28 - Tags: checkbox, cool checkbox, tick checkbox */
.checkbox-wrapper *,
.checkbox-wrapper ::after,
.checkbox-wrapper ::before {
box-sizing: border-box;
}
.checkbox-wrapper .container input {
opacity: 1;
-webkit-appearance: none;
cursor: pointer;
height: 50px;
width: 50px;
box-shadow: -10px -10px 15px rgba(255,255,255,0.5),
10px 10px 15px rgba(0,0,70,0.12);
border-radius: 50%;
border: 8px solid #ececec;
outline: none;
display: flex;
justify-content: center;
align-items: center;
transition: .5s;
}
.checkbox-wrapper .container {
display: flex;
justify-content: center;
align-items: center;
}
.checkbox-wrapper .container input::after {
transition: .5s;
font-family: monospace;
content: '';
color: #7a7a7a;
font-size: 25px;
left: 0.45em;
top: 0.25em;
width: 0.25em;
height: 0.5em;
border: solid #7a7a7a;
border-width: 0 0.15em 0.15em 0;
transform: rotate(45deg);
}
.checkbox-wrapper .container input:checked {
box-shadow: -10px -10px 15px rgba(255,255,255,0.5),
10px 10px 15px rgba(70,70,70,0.12),
inset -10px -10px 15px rgba(216, 212, 212, 0.5),
inset 10px 10px 15px rgba(70,70,70,0.12);
transition: .5s;
}
.checkbox-wrapper .container input:checked::after {
transition: .5s;
border: solid #15bae3;
border-width: 0 0.15em 0.15em 0;
transform: rotate(45deg);
}
</style>