<p> elements that are direct children of a <div> All <p> elements anywhere inside a <div> Every <p> that follows a <div> A <p> immediately after a <div>
:hover is a pseudo-class (a state); ::before is a pseudo-element (generated content) Both are pseudo-elements Both are pseudo-classes ::before is a state
They are identical Transitions use @keyframes Animations require JavaScript A transition animates between two states when a property changes; an animation runs keyframes that can loop without any trigger
It is the same as fixed It works only on images The element acts as relatively positioned until a scroll threshold is reached, then sticks like a fixed element within its container It removes the element from the flow