Just wondering if there's a way, using CSS/HTML only, to have a transition take place without a trigger event such as hover. For example, have the site logo start off in grayscale then transition to color after the page loads.
@Snillor CSS animations are self-invoking transitions, with extra capabilities. The answer is yes, but you have to be willing to use 'animations' and not 'transitions'.
Think of the definition of the word 'transition'. It reflects a change between two states. With the way CSS is set up, a single selector cannot have two independent states, that's what pseudo-classes are for.
As Phil_Lu noted, however, I'm asking about transitions.
Think of the definition of the word 'transition'. It reflects a change between two states. With the way CSS is set up, a single selector cannot have two independent states, that's what pseudo-classes are for.
Just noticed this this thread on transitions and page load - Transitions Only After Page Load. In it, Chris said:
"It would be nice to be able to prevent or trigger animations/transitions on page load without JavaScript, but alas."
The animation fires on page load, and the transition on the hover.
Since my original question about auto-starting transitions seems to have been answered, I'll mark this closed.