#foo:checked::before,
input[type="checkbox"] {
position:absolute;
clip: rect(0,0,0,0);
clip: rect(0 0 0 0);
}
#foo:checked,
input[type="checkbox"] + label::before {
content: url('checkbox.png');
}
input[type="checkbox"]:checked + label::before {
content: url('checkbox-checked.png');
}
#foo doesn't reference any particular element, it's there to prevent browsers from implementing the later selectors.
1 Response
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.