Our volunteers haven't translated this article into Română yet. Join us and help get the job done!
You can also read the article in English (US).

The :indeterminate CSS pseudo-class represents any form element whose state is indeterminate.

/* Selects any <input> whose state is indeterminate */
input:indeterminate {
  background: lime;
}

Elements targeted by this selector are:

Syntax

:indeterminate

Examples

Checkbox & radio button

This example applies special styles to the labels associated with indeterminate form fields.

HTML

<div>
  <input type="checkbox" id="checkbox">
  <label for="checkbox">This label starts out lime.</label>
</div>
<div>
  <input type="radio" id="radio">
  <label for="radio">This label starts out lime.</label>
</div>

CSS

input:indeterminate + label {
  background: lime;
}

JavaScript

var inputs = document.getElementsByTagName("input");

for (var i = 0; i < inputs.length; i++) {
  inputs[i].indeterminate = true;
}

Progress bar

HTML

<progress>

CSS

progress {
  margin: 4px;
}

progress:indeterminate {
  opacity: 0.5;
  background-color: lightgray;
  box-shadow: 0 0 2px 1px red;
}

Result

Specifications

Specification Status Comment
HTML Living Standard
The definition of ':indeterminate' in that specification.
Living Standard No change.
HTML5
The definition of ':indeterminate' in that specification.
Recommendation Defines the semantics of HTML and constraint validation.
Selectors Level 4
The definition of ':indeterminate' in that specification.
Working Draft No change.
CSS Basic User Interface Module Level 3
The definition of ':indeterminate' in that specification.
Recommendation Defines the pseudo-class, but not the associated semantics.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
:indeterminateChrome Full support 1Edge Full support 12Firefox Full support 2IE Full support 10Opera Full support YesSafari Full support 3WebView Android Full support ≤37Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support 1Samsung Internet Android Full support 1.0
type="checkbox"Chrome Full support 1Edge Full support 12Firefox Full support 3.6IE Full support 10Opera Full support 10.6Safari Full support 3WebView Android Full support ≤37Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 11Safari iOS Full support 1Samsung Internet Android Full support 1.0
<progress>Chrome Full support 6Edge Full support 12Firefox Full support 6IE Full support 10Opera Full support 15Safari Full support 5.1WebView Android Full support 37Chrome Android Full support 18Firefox Android Full support 6Opera Android Full support 14Safari iOS Full support 5Samsung Internet Android Full support 1.0
type="radio"Chrome Full support 39Edge No support No
Notes
No support No
Notes
Notes See Edge bug 7124038.
Firefox Full support 51IE No support NoOpera Full support 26Safari No support No
Notes
No support No
Notes
Notes See WebKit bug 156270.
WebView Android Full support 39Chrome Android Full support 39Firefox Android Full support 51Opera Android ? Safari iOS No support No
Notes
No support No
Notes
Notes See WebKit bug 156270.
Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.