Animating CSS
CSS is a powerful tool, and one of the powers it has is that many CSS properties can be animated. You can animate the color, position, and even the shape of a CSS element. This gives you the ability to make your site more dynamic and interesting by just adding and removing CSS classes.
Three somewhat overlapping CSS concepts allow you to animate the display of existing elements with CSS:
-
transform is a CSS property that instantly changes the values of other CSS properties by changing the size, position, or orientation of the element being drawn.
-
transition specifies a CSS property and a duration. When the specified property changes, the change happens gradually over the specified duration of time, rather than instantaneously. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access