samedi 16 décembre 2017

Blinking checkbox

Good day !
There is a checkbox, styled by label.
When you hover over the checkbox it blinks once, after its activation, too, blinks once, what's the problem ?
HTML:

<input type="checkbox" id="checkID" name="checkID" value="false"/>
<label for="checkID" class="checkbox " onclick="anonymousCheckbox(event, this)"><span></span>anonymous</label>

CSS:

.checkbox {cursor: pointer}

.checkbox:before {
    display: block;
    cursor: pointer;
    content: '';
    float: left;
    background: url(/img/svg/check_box_before.svg);
    margin: 0 7px 0 0;
    width: 15px;
    height: 15px
 }

.checkbox:hover:before {background-image: url(/img/svg/check_box_hover.svg)}

.checkbox.on:before {background-image: url(/img/svg/checkbox_before.svg)}

.checkbox.on:hover:before {background-image: url(/img/svg/checkbox_hover.svg)}




Aucun commentaire:

Enregistrer un commentaire