I have a checkbox that I want to change the color of the checkmark to green when it is checked. How can I achieve this?
<input type="checkbox" checked="checked" disabled="disabled" />
The current method I tried is not working.
<style type="text/css">
input[type=checkbox], input[type=file] {
display: inline-block;
margin-right: 15px;
}
input[type="checkbox"]:disabled:checked + label::after {
border: 3px solid #228B22;
border-top: none;
border-right: none;
}
input[type="checkbox"]:checked + label::after {
content: '';
position: absolute;
width: 1.2ex;
height: 0.4ex;
background: rgba(0, 0, 0, 0);
top: 0.9ex;
left: 0.4ex;
border: 3px solid #1062a4;
border-top: none;
border-right: none;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
</style>