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

72 lines
2.0 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 radio button */
.custom-checkbox-container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom radio button */
.custom-checkbox-radiobutton {
position: absolute;
top: 0;
left: 0;
height: 25px;
width: 25px;
background-color: #eee;
border-radius: 50%;
}
/* On mouse-over, add a grey background color */
.custom-checkbox-container:hover input~.custom-checkbox-radiobutton {
background-color: #ccc;
}
/* When the radio button is checked, add a blue background */
.custom-checkbox-container input:checked~.custom-checkbox-radiobutton {
background-color: #2196F3;
}
/* Create the indicator (the dot/circle - hidden when not checked) */
.custom-checkbox-radiobutton:after {
content: "";
position: absolute;
display: none;
}
/* Show the indicator (dot/circle) when checked */
.custom-checkbox-container input:checked~.custom-checkbox-radiobutton:after {
display: block;
}
/* Style the indicator (dot/circle) */
.custom-checkbox-container .custom-checkbox-radiobutton:after {
top: 9px;
left: 9px;
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
}
</style>
<div class="custom-radiobutton">
<label class="custom-checkbox-container">{{ include.label }}
<input type="custom-checkbox-radiobutton" checked="{{ include.checked }}">
<span class="custom-checkbox-radiobutton"></span>
</label>
</div>