Share via


:not

套用一或多個樣式至作為其父元素第一個子項的任何元素。

語法

:not(s) {sRules }

可能的值

s:類型選取器選取器、通用選取器選取器、屬性選取器、類別選取器選取器、識別碼選取器選取器或虛擬類別選取器。

sRules

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

備註

:not 虛擬類別採用簡單選取器作為引數,以選取該引數未選取的元素。

標準資訊

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

適用範圍

a , abbr , acronym , address , b , big , blockquote , body , caption , center , cite , code , col , colgroup , dd , dfn , dir , div , dl , dt , em , form , hn , html , i , img , input , input type=button , input type=checkbox , input type=file , input type=hidden , input type=image , input type=password , input type=radio , input type=reset , input type=submit , input type=text , kbd , label , legend , li , listing , marquee , menu , ol , p , plaintext , pre , s , samp , select , small , span , strike , strong , sub , sup , table , tbody , td , textarea , tfoot , th , thead , tr , tt , u , ul , var , xmp

另請參閱

概念

虛擬類別
虛擬類別與虛擬元素