The adjacent sibling selector (+) is placed between two CSS selectors. It matches only those elements matched by the second selector that are the next sibling element of the first selector. For example, to select all <img> elements that are immediately preceded by a <p> element:
p + img {
...
}
If you want to select siblings of an element even if they are not directly adjacent, then you can use the general sibling combinator (~). To select all <img> elements that come anywhere after <p> elements, we'd do this:
p ~ img {
...
}
Source: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors/Combinators