Before you start to experiment in moving elements with CSS it’s useful to know what can’t be animated. In the current spec, the following properties cannot be manipulated with keyframes or transitions:
- gradients (Gradient animation is part of the specification, but not supported in any browser yet, with the surprising exception of IE10+)
- almost anything to do with the background property, including
background-positioncan be animated.
- you cannot animate the
heightof an element from an auto-computed, natural height (e.g. an element filled with text), although is is possible to animate its
While there are usually ways around these limitations, including animating SVG gradients – it’s good to know what CSS can’t do before you waste a lot of time and energy.
- A list of what the CSS spec currently can animate.
- Can I Animate, a searchable index of animatable properties.
Photograph by Pablo Fernández, licensed under Creative Commons
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.