Skip ordered list item numbering

前端 未结 5 2055
轮回少年
轮回少年 2021-02-18 22:34

I have an ordered list and I\'d like to skip the number output from a particular item.

Traditional output:

1. List item
2. List item
3. List item
4. List         


        
5条回答
  •  悲&欢浪女
    2021-02-18 23:26

    It's quite simple now.

    Just add the following to a class .skip with .skip being used for the skipped list-item:

    ol li.skip {
        list-style-type:none;
        counter-increment:none;
    }
    

    in HTML it would be:

    1. first list item
    2. third list item

    resulting in:

    1. first list item
      2nd list item
    2. third list item

提交回复
热议问题