Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 764 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 764 Bytes

CSS animation utilities

Useful JavaScript snippets related to CSS animation.

isAnimationSupported

Determine if a particular property can be animated with either transitions or keyframe animation.

Parameters

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.)

Example use

isAnimationSupported('background', 'red', 'green');