Multiple CSS Pseudo Classes

后端 未结 5 686
攒了一身酷
攒了一身酷 2020-12-09 14:22

What is the proper CSS syntax for applying multiple pseudo classes to a selector. I\'d like to insert \",\" after each item in a list except the last one. I am using the f

5条回答
  •  旧时难觅i
    2020-12-09 15:15

    You could use the adjacent sibling selector:

    ul.phone_numbers li + li:before {
       content: ",";
    }
    

提交回复
热议问题