WEB標準學習路程之”CSS”:11.偽對象選擇符

來源:互聯網
上載者:User
 

偽對象

Pseudo-Elements
偽對象

CSS Version
版本

Compatibility
相容性

Description
簡介

:first-letter

CSS2

IE5.5+

設定對象內的第一個字元的樣式表屬性

:first-line

CSS2

IE5.5+

設定對象內的第一行的樣式表屬性

:before

CSS2

NONE

用來和content屬性一起使用,設定在對象前(依據對象樹的邏輯結構)發生的內容

:after

CSS2

NONE

用來和content屬性一起使用,設定在對象後(依據對象樹的邏輯結構)發生的內容

:before 版本:CSS2 相容性:NONE

文法:Selector : before { sRules }

 

說明: 

用來和content屬性一起使用,設定在對象前(依據對象樹的邏輯結構)發生的內容。

目前IE5.5尚不支援此偽對象。

 

樣本: em:before { content: url("ding.wav")

:after 版本:CSS2 相容性:NONE

文法: Selector : after { sRules }

 

說明: 

用來和content屬性一起使用,設定在對象後(依據對象樹的邏輯結構)發生的內容。

目前IE5.5尚不支援此偽對象。

 

樣本: table:after { content: END OF TABLE }

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.