使用" list-style-type:decimal-leading-zero;"
时是否可能丢失点?我找到了一个丢失点的解决方案,但是我无法添加前导零。
ol {
counter-reset: item;
list-style-type: decimal-leading-zero;
}
li { display: block; }
li:before {
content: counter(item) " ";
counter-increment: item
}
答案 0 :(得分:5)
您可以为计数器设置list-style-type:
ol {
counter-reset: item;
list-style-type: none;
}
li { display: block; }
li:before {
content: counter(item, decimal-leading-zero) " ";
counter-increment: item;
}