CSS 3 Module | <== Test # ==> | |
---|---|---|
W3C Selectors | 178 of 182 | |
Testing | Date | Revision |
:indeterminate and :checked (ID #d5a) | 2005-10-20 | 1.1 |
NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.
Everything in this paragraph should have a green background.
input, span { background: green; } input:checked, input:checked + span { background: red; }
<div> <script type="text/javascript"> function test() { /* Technically not part of DOM1 HTML but Tantek assures me that is an oversight... */ document.getElementById("test").indeterminate = true; } window.setTimeout("test()", 100); </script> <p> <input id="test" type="checkbox"> <span>Everything in this paragraph should have a green background.</span> </p> </div>