I need to change the look of my checkbox button, it is I who need to place an arbitrary background image instead of the usual gray square.
Now I tried something like this:
[type="checkbox"] {
width: 15px;
height: 15px;
background-image: url("../images/checkbox.png")
}
[type="checkbox"]:checked {
width: 15px;
height: 15px;
-webkit-appearance: none;
background-image: url("../images/checkbox-c.png")
}
and it works great when checking, but in standby mode it does not change the background image to checkbox.png it remains a simple gray square.
source
share