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.


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

You may also like...