html中有序列表的嵌套,Html有序列表1.1,1.2(嵌套计数器和范围)不起作用

我使用嵌套计数器和范围来创建有序列表:

ol {

counter-reset: item;

padding-left: 10px;

}

li {

display: block

}

li:before {

content: counters(item, ".") " ";

counter-increment: item

}

  1. one
  2. two
    1. two.one
    2. two.two
    3. two.three
  3. three
    1. three.one
    2. three.two
      1. three.two.one
      2. three.two.two
  4. 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

我不知道,有谁看到它出错了?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值