How to style unordered lists in CSS as comma separated text

后端 未结 6 2051
时光说笑
时光说笑 2020-12-08 06:10

I’m looking for a way to style an unordered list in XHTML with CSS such that it is rendered inline and the list items are separated by commas.

For example, the follo

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 06:28

    To remove the trailing comma, use the :last-child pseudo-class, like so:

    #taglist li:last-child:after {
        content: "";
    }
    

提交回复
热议问题