CSS计数器
html {
color: #444;
font: 16px/1.6 微软雅黑,"Microsoft YaHei";
}
ul {
list-style: none;
padding-left: 3em;
}
.menu {
counter-reset: chapter;
}
.menu > li {
counter-increment: chapter;
counter-reset: section;
}
.menu > li:before {
content: "第" counter(chapter) "章";
padding-right: .5em;
}
.menu ul > li {
counter-increment: section;
}
.menu ul > li:before {
content: "第" counter(section) "节";
padding-right: .5em;
}
http://HdhCmsTest999jiujiu测试数据/
查看更多关于CSS3使用计数器自动添加数字序号功能_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did108143