CSS: Can I choose a specific child plus the next next brother?

I am currently using Javascript, but I was wondering if it is possible to select a specific child from an unordered list and then its closest relative using CSS.

Example with 4 lists:

ul.tab li:hover + (the next sibling that follows the current hovered one) {

}
+3
source share
1 answer

You want an adjacent selector selector for which you basically already have syntax.

Please note: :hover- This is, in particular, an issue with the x browser in Safari.

+4
source

Source: https://habr.com/ru/post/1775212/


All Articles