:last-of-type

套用一或多個樣式至本身為其所屬類型中最後一個同層級元素的元素。

語法

:last-of-type { sRules }

可能的值

sRules

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

備註

:last-of-type 虛擬類別是結構性虛擬類別。結構性虛擬類別可在無法使用簡單選取器或結合器選取項目的文件樹狀目錄中,根據額外的資訊執行選取動作。

標準資訊

您可以在 CSS Selectors Level 3 (CSS 選取器層級 3) Gg721791.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

另請參閱

概念

:empty
:first-child
:first-of-type
:last-child
:last-of-type
:nth-child
:nth-last-child
:nth-last-of-type
:nth-of-type
:only-child
:only-of-type
:root