Select all elements after specific element

前端 未结 1 1373
有刺的猬
有刺的猬 2020-12-09 07:07

I want to apply some specific styles to all elements which come after a certain element. For example, I want to select all elements which come after the divider

相关标签:
1条回答
  • 2020-12-09 07:57

    You can use

    .divider ~ li {
        background-color:green;
    }
    
    0 讨论(0)
提交回复
热议问题