css nth child from element with class

后端 未结 2 1377
渐次进展
渐次进展 2021-01-23 01:28

I there a way of selecting (using css) the nth child from an element with a certain class. For example, for the following, how could I select the li element with th

2条回答
  •  遇见更好的自我
    2021-01-23 02:28

    Actually you could do with + selector. It is a bit dirty, but works in your case. All you need is to know the exact position of element you need.

    .selected + li + li (adding + li as much times as you need)

提交回复
热议问题