HTML list with different images as bullets

后端 未结 5 1142
北恋
北恋 2021-01-19 07:06

I know it is possible to set an image instead of the HTML default bullets:

list-style-image: url(...);

But I havent\'t found a way how I ca

5条回答
  •  甜味超标
    2021-01-19 07:39

    I think you can do this with classes

  • ... li.first { ⋮ declarations } li.second { ⋮ declarations } ...

    or the nth-child selector

    li:nth-child(1) {
      ⋮ declarations
    }
    
    li:nth-child(2) {
      ⋮ declarations
    }
    ...
    

提交回复
热议问题