indeterminate property CSS Reference



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

<style>
       input, span { background: red }
       :indeterminate, :indeterminate + span { background: limegreen }
</style>
<p><input type=checkbox> <span>Everything in this paragraph should have a green background.</span></p>
<script> document.getElementsByTagName("input")[0].indeterminate = true; </script> 

Compatibility

Desktop browsers

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
type="checkbox"(Yes)3.6 (1.9.2)9.010.60 (2.6)3.0
<progress>6.06.0 (6.0)10NA5.2

Mobile browsers

FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
type="checkbox"NA1.0 (1.9.2)NANANA
<progress>NA6.0 (6.0)NANANA

Relative articles