我使用嵌套计数器和范围来创建有序列表:
ol {
counter-reset: item;
padding-left: 10px;
}
li {
display: block
}
li:before {
content: counters(item, ".") " ";
counter-increment: item
}
- one
- two
- two.one
- two.two
- two.three
- three
- three.one
- three.two
- three.two.one
- three.two.two
- four
我期待以下结果:
1. one
2. two
2.1. two.one
2.2. two.two
2.3. two.three
3. three
3.1 three.one
3.2 three.two
3.2.1 three.two.one
3.2.2 three.two.two
4. four
相反,这就是我所看到的(错误的编号):
1. one
2. two
2.1. two.one
2.2. two.two
2.3. two.three
2.4 three
2.1 three.one
2.2 three.two
2.2.1 three.two.one
2.2.2 three.two.two
2.3 four
我不知道,有谁看到它出错了?