我正在尝试创建一个有序列表,其中包含嵌套列表和字母数字字符的编号样式。
示例:
a. one
b. two
b.a. three
b.b. four
b.c. five
c. six
c.a. seven
c.a.a. eight
c.b. nine
c.b.a. ten
d. eleven
我曾试过将list-style-type设置为lower-alpha,但它不能正确地给嵌套列表编号。 我通过以下的数字达到了我想要的效果:
ol {
counter-reset: section;
list-style-type: none;
}
li {
counter-increment: section;
}
li::before {
content: counters(section,".") ". ";
}
现在我想要相同的东西,但是带有字母数字字符作为编号样式。 解决方案可以使用HTML、CSS或JS完成。