General Sibling Selector
Structure
element1 ~ element2
Description
This selector allows us to select an element which is a sibling of another element and comes after it in the markup code. Text and elements between the siblings are ignored. Only elements and their position in the document matter.
Examples
Compatibility
Chrome | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|
Any | 1+ | 7+ | 9+ | 3+ |