:checked

套用一或多個樣式至選取的表單控制項元素。

語法

:checked { sRules }

可能的值

sRules

指定一或多個階層式樣式表 (CSS) 屬性/值組的值。

備註

:checked 虛擬類別是 UI 元素狀態虛擬類別。UI 元素狀態虚擬類別可選取處於特定狀態 (已啟用、已停用或已選取/已核取) 的 UI 元素 (如選項按鈕或核取方塊等表單控制項)。

標準資訊

您可以在 CSS Selectors Level 3 (CSS 選取器層級 3) Gg721803.xtlink_newWindow(zh-tw,Expression.40).png 找到此虛擬元素的定義。

適用範圍

a , address , b , big , blockquote , body , br , button , caption , cite , code , dd , dfn , div , dl , dt , em , hn , i , img , input type=file , input type=image , input type=password , input type=text , kbd , label , legend , li , listing , marquee , menu , nobr , ol , p , plaintext , pre , s , samp , small , span , strike , strong , sub , sup , table , tbody , td , textarea , tfoot , th , thead , tr , tt , u , ul

dd, dfn, div, dl, dt, em, hn, i, img, input type=file, input type=image, input type=password, input type=text, kbd, label, legend, li, listing, marquee, menu, nobr, ol, p, plaintext, pre, s, samp, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul

另請參閱

概念

:enabled
:disabled
:indeterminate