Pattern:
element1 ~ element2
Definition:
The element1 ~ element2 selector matches every element2 that is a sibling of element1 (they need to have the same parent), and element1 must precede (not necessarily immediately) element2.
Examples:
Style every <p> element that is placed after an <h1> element with the same parent
1 | h 1 ~ p { margin-top : 10px ; } |
Please login to continue.