是否可以将 ol 列表编号(2 位数字)排列为从左侧开始。
通常是这样的
1
2
.
.
10
12
但我需要这样显示
最佳答案
也许您可以使用计数器增量来实现这一点。像这样写:
ul{ counter-reset: chapter 0; }
li:before{
counter-increment: chapter;
content:counter(chapter) ". ";
width:20px;
display: inline-block;
text-align: right;
}
关于html - 将 ol 列表编号排列到左侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12635206/