The way that w3schools phrases it, they sound the same.
W3Schools' CSS reference
div + p
Selects all <p>
elements that are placed immediately after <div>
elements
div ~ p
Selects every <p>
element that are preceded by a <div>
element
If a <p>
element is immediately after a <div>
element, doesn't that mean that the <p>
element is preceded by a <div>
element?
Anyhow, I'm looking for a selector where I can select an element that is place immediately before a given element.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…