I am trying to come up with a pure-css fancy checkbox. And I have succeeded to achieve my goal by 90%, with the only exception that I see the irritating standard chechbox appear from under my fancy checkbox. And I can't get rid of it. Any help ?
.checkboxFive {
width: 12px;
margin: 12px 100px;
position: relative;
}
.checkboxFive label {
cursor: pointer;
position: absolute;
width: 12px;
height: 12px;
top: 0;
left: 0;
background: #eee;
border: 1px solid #ddd;
}
.checkboxFive label:after {
opacity: 0;
content: '';
position: absolute;
width: 11px;
height: 4px;
background: transparent;
top: 1px;
left: 3px;
border: 2px solid #333;
border-top: none;
border-right: none;
transform: rotate(-45deg);
}
.checkboxFive label:hover::after {
opacity: 0.5;
}
.checkboxFive input[type=checkbox]:checked + label:after {
opacity: 1;
}
<div class="checkboxFive">
<input type="checkbox" value="1" id="checkboxFiveInput" name="" />
<label for="checkboxFiveInput"></label>
</div>