Custom Checkbox Styles
No extra markup, just awesome styles!
by padma rubhan
HTML
<input type="checkbox" class="gf-checkbox"/>
CSS
.gf-checkbox {
position: relative;
width: 12px;
height: 12px;
margin: 0;
display: inline-block;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: 0;
}
.gf-checkbox:after {
content: '';
position: absolute;
display: block;
z-index: 1;
width: 12px;
height: 12px;
border: 1px solid #cac8cf;
border-radius: 1px;
}
.gf-checkbox[type=checkbox]:before {
background:#1ad93e;
position: absolute;
z-index: 2;
opacity: 0;
width: 65%;
height: 65%;
color: #f6ac4f;
}
.gf-checkbox[type=checkbox]:checked:before {
content: '';
position: absolute;
top: 0px;
opacity: 1;
left: 0px;
margin: 2px;
border: 1px solid #1ad93e;
border-radius: 1px;
}