中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

counter-reset

實例

對部分和子部分進(jìn)行編號(比如 "Section 1"、"1.1"、"1.2")的方法:

body { counter-reset:section; } h1 { counter-reset:subsection; } h1:before { counter-increment:section; content:"Section " counter(section) ". "; } h2:before { counter-increment:subsection; content:counter(section) "." counter(subsection) " "; }

運行代碼 ?

屬性定義及使用說明

counter-reset屬性創(chuàng)建或重置一個或多個計數(shù)器。

counter-reset屬性通常是和counter-increment屬性,content屬性一起使用。

默認(rèn)值: none
繼承: no
版本: CSS2
JavaScript 語法: object.style.counterReset="subsection"

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流瀏覽器都支持counter-reset屬性。

注意: IE8只有指定!DOCTYPE才支持counter-reset屬性。


屬性值

說明
none 默認(rèn)。不能對選擇器的計數(shù)器進(jìn)行重置
id number id 定義重置計數(shù)器的選擇器、id 或 class。 number 可設(shè)置此選擇器出現(xiàn)次數(shù)的計數(shù)器的值??梢允钦龜?shù)、零或負(fù)數(shù)。
inherit 規(guī)定應(yīng)該從父元素繼承 counter-reset 屬性的值

相關(guān)文章

CSS reference: :before 偽元素

CSS reference: :after 偽元素

CSS reference: content 屬性

CSS reference: counter-increment 屬性