samedi 10 janvier 2015

Checkmark in checkbox not appearing when changing CSS

I'm trying to change the size,color,etc... of a checkbox using CSS. I have everything formatted the way I want aside from when the box is checked. When the box is checked, the check/tick mark does not appear and nothing seems to happen. However, I know it works otherwise because I can set the background color to change, and it works then.


Does adding "content: '✔';" do anything in the CSS as far as what I'm trying to accomplish, or am I using it incorrectly?


For example



input[type=checkbox]:checked {
content: '✔';
background-color:white;
}


Here's a fiddle that demonstrates the background color of the checkbox changing. Here's another fiddle of what I'm trying to do by using a check mark when the box is checked.





Aucun commentaire:

Enregistrer un commentaire