Selector for one tag directly followed by another tag

后端 未结 4 1129
死守一世寂寞
死守一世寂寞 2020-12-30 18:18

This selects all tags directly preceded by tags:

A+B {
    /* styling */
}

What is t

4条回答
  •  情歌与酒
    2020-12-30 18:40

    You can’t in css.

    Edit: To be a bit more helpful, if you use for example jQuery (a JavaScript library), you can use .prev().

提交回复
热议问题