indeterminate property Author admin Reading 1 min Views 391 Published by May 8, 2013 Modified by September 21, 2024
Definition and Usage The :indeterminate CSS pseudo-class represents any <input type=”checkbox”> element whose indeterminate DOM property is set to true by JavaScript. In addition, in some browsers, it can be used to match to <progress> elements in an indeterminate state.
Examples
2 input, span { background: red }
3 :indeterminate, :indeterminate + span { background: limegreen }
5 <p><input type=checkbox> <span>Everything in this paragraph should have a green background.</span></p>
6 <script> document.getElementsByTagName("input")[0].indeterminate = true; </script>
Compatibility Desktop browsers Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari type="checkbox" (Yes) 3.6 (1.9.2) 9.0 10.60 (2.6) 3.0 <progress> 6.0 6.0 (6.0) 10 NA 5.2
Mobile browsers Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile type="checkbox" NA 1.0 (1.9.2) NA NA NA <progress> NA 6.0 (6.0) NA NA NA