: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