CSS Checkbox
<div class="toggle">
<input class="check" type="checkbox" tabindex="0">
<label></label>
</div>
<style>
.toggle {
position: relative;
}
.check {
position: absolute;
width: 3rem;
height: 3rem;
margin: 0;
opacity: 0;
cursor: pointer;
}
label {
position: absolute;
pointer-events: none;
content: '';
width: 3rem;
height: 3rem;
background: black;
cursor: pointer
}
.check:checked + label {
background: red;
}
</style>
Quick css checkbox. I used to do this all the time and feel like maybe there was a better way… anyway, this is what I did to get it working fast…