Can you count a particular class with CSS?

后端 未结 7 915
刺人心
刺人心 2021-02-02 08:08

Lets say I have a simple list like so:

  1. one
  2. two
  3. &l
7条回答
  •  执念已碎
    2021-02-02 08:33

    You can use HTML to set the value of a list item specifically:

    • one
    • two
    • three
    • four
    • blabla
    • five
    • six
    • blabla
    • seven

    http://jsfiddle.net/03bu5sct/1/

    You may also want to look at CSS3 counters if you want a pure CSS solution.

提交回复
热议问题