CSS 3 Module | <== Test # ==> | |
---|---|---|
W3C Selectors | 10 of 11 of the dynamic tests category | |
Testing | Date | Revision |
:indeterminate with :checked (ID #d5d) | 2001-11-27 | 1.0 |
NOTE: The UA must support ECMA-262 and DOM Level 2 Core for this test.
This checkbox should have a green background.
input { background: green; } input:indeterminate:checked { background: red; }
<div> <script> <![CDATA[ function test() { /* Microsoft specs for .indeterminate say that this is an invalid test as an element can be both .checked and ,indeterminate; however the selectors spec says no element can be :checked:indeterminate. */ document.getElementById("test").indeterminate = true; } window.setTimeout("test()", 100); ]]> </script> <p> <input id="test" type="checkbox" checked="checked"></input> This checkbox should have a green background. </p> </div>