galaxy/Checkboxes/andrew-demchenk0_clever-cobra-93.html

40 lines
1.3 KiB
HTML

<label class="container">
<input type="checkbox">
<svg id="Glyph" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M2.156,14.901l2.489-8.725C5.012,4.895,6.197,4,7.528,4h13.473C21.554,4,22,4.448,22,5v14 c0,0.215-0.068,0.425-0.197,0.597l-5.392,7.24C15.813,27.586,14.951,28,14.027,28c-1.669,0-3.026-1.357-3.026-3.026V20H5.999 c-1.265,0-2.427-0.579-3.188-1.589C2.047,17.399,1.809,16.12,2.156,14.901z" id="XMLID_259_"></path><path d="M25.001,20h4C29.554,20,30,19.552,30,19V5c0-0.552-0.446-1-0.999-1h-4c-0.553,0-1,0.448-1,1v14 C24.001,19.552,24.448,20,25.001,20z M27.001,6.5c0.828,0,1.5,0.672,1.5,1.5c0,0.828-0.672,1.5-1.5,1.5c-0.828,0-1.5-0.672-1.5-1.5 C25.501,7.172,26.173,6.5,27.001,6.5z" id="XMLID_260_"></path></svg>
</label>
<style>
/* From Uiverse.io by andrew-demchenk0 - Tags: checkbox, thumb, dislike */
.container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
.container {
display: block;
position: relative;
cursor: pointer;
user-select: none;
}
svg {
position: relative;
top: 0;
left: 0;
height: 50px;
width: 50px;
transition: all 0.3s;
fill: #666;
}
svg:hover {
transform: scale(1.1) rotate(-10deg);
}
.container input:checked ~ svg {
fill: rgb(185, 51, 51);
}
</style>