:indeterminate
indeterminate擬似クラスはCSS4で定義されている未確定なUI要素を選択できるセレクタです。
未確定とはHTML5で定義された状態で、checkboxやradioボタンにJavaScriptでindeterminateプロパティに”true”を指定することで未確定な状態をつくり上げることができ、indeterminate擬似クラスは未確定が指定されたUI要素を選択できるセレクタです。
:indeterminate{
opacity:0.6;
}
JavaScriptでは次のようにしてindeterminateプロパティを変更できます。
<input type="checkbox" id="foo">
<script>
document.getElementById("foo").indeterminate = true;
</script>
参考URL
11.2.2. The indeterminate-value pseudo-class :indeterminate - W3C
登録日 : 2013年06月19日 最終更新日 : 2013年6月19日
同じカテゴリー(Selector)のエントリー
- 兄弟セレクタ
- 隣接セレクタ
- 子セレクタ
- :not()
- idセレクタ
- classセレクタ
- ::after
- ::before
- ::first-letter
- ::first-line
- :indeterminate
- :checked
- :disabled
- :enabled
- :lang()
- :target
- :focus
- :active
- :hover
- :visited
- :link
- :empty
- :only-of-type
- :only-child
- :last-of-type
- :first-of-type
- :last-child
- :first-child
- :nth-last-of-type()
- :nth-of-type()
- :nth-last-child()
- :nth-child()
- :root
- 属性セレクタ
- 子孫セレクタ
- 要素セレクタ
- ユニーバサルセレクタ