EyeTrackVR-Docs/docs/_includes/custom/checkboxes/checkbox.html
2022-06-06 05:47:08 +02:00

73 lines
1.9 KiB
HTML

<style>
/* Customize the label (the container) */
.custom-checkbox-container {
display: block;
position: relative;
padding-left: 35px;
margin-bottom: 12px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Hide the browser's default checkbox */
.custom-checkbox-container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom checkbox */
.custom-checkbox-checkmark {
position: absolute;
top: 0;
left: 0;
height: 25px;
width: 25px;
background-color: #eee;
}
/* On mouse-over, add a grey background color */
.custom-checkbox-container:hover input~.custom-checkbox-checkmark {
background-color: #ccc;
}
input[type="checkbox"]:checked {
background-color: #3899ff;
}
input[type="checkbox"]:checked:after {
display: block;
}
/* Create the checkmark/indicator (hidden when not checked) */
.custom-checkbox-checkmark:after {
content: "";
position: absolute;
display: none;
}
/* Style the checkmark/indicator */
.custom-checkbox-container .custom-checkbox-checkmark:after {
left: 9px;
top: 5px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
</style>
<div class="custom-checkbox">
<label class="custom-checkbox-container">{{ include.label }}
<input type="custom-checkbox-checkbox" checked="{{ include.checked }}">
<span class="custom-checkbox-checkmark"></span>
</label>
</div>