HTML Dog
跳至导航

CSS 属性:counter-increment

增加一个由生成内容使用的命名计数器。

可能的值

描述示例
[标识符]计数器名称。每次计数时,计数器将增加 1。countername
[标识符] [整数]计数器名称以及每次计数时计数器应该增加的数量。countername 7
[多个标识符]多个标识符,或与整数配对的标识符,将对多个计数器应用递增。countername 7 counter2name 3
none不递增计数器。
inherit
initial
unset

示例


h3 {
    counter-increment: headingnum;
}
h3::before {
    content: counter(headingnum);
}

浏览器支持