1、counter-increment属性指定一个或多个CSS计数器的增量值。它将一个或多个标识符作为值,指定要递增的计数器的名称。
2、counter-increment属性必须和counter-reset属性配合使用。
语法
counter-increment:[<标识符><整数>?]+|none|inherit
实例
article{/*定义和初始化计数器*/ counter-reset:section;/*'section'是计数器的名称*/ } article h2{/*每出现一次h2,计数器就增加1*/ counter-increment:section;/*相当于计数器增量:第1节;*/ }
以上就是css中counter-increment属性的介绍,希望对大家有所帮助。 更多css学习指路: css教程
本文教程操作环境:windows7系统、css3版,DELL G3电脑。
查看更多关于css中counter-increment属性是什么的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did228540