Useful JavaScript snippets related to CSS animation.
Determine if a particular property can be animated with either transitions or keyframe animation.
property
- The property to test.
from
- A valid starting value for the animation.
to
- A valid ending value for the animation.
element
(optional)- The element to test with. (Required for testing properties with prerequisites, e.g. "top" requires non-static position.)
isAnimationSupported('background', 'red', 'green');