I have a checkbox and I changed the checkbox style in a circle. Now I need when the user chooses the checkbox then I have to display the check mark.
If I remove -webkit-appearance: none;
then I am getting it but my css not working.
How can I do this?
.checkbox_round {
width: 18px;
height: 18px;
background-color: white;
border-radius: 50%;
vertical-align: middle;
border: 1px solid #ddd;
outline: none;
cursor: pointer;
-webkit-appearance: none;
}
.checkbox_round:hover {
border-color: #000;
}
.checkbox_round:checked {
background-color: #f00;
}
<label><input type="checkbox" name="name1" value="1" class="checkbox_round"> check box1 </label>
<label><input type="checkbox" name="name2" value="2" class="checkbox_round"> check box1 </label>
<label><input type="checkbox" name="name3" value="3" class="checkbox_round"> check box1 </label>
Aucun commentaire:
Enregistrer un commentaire