Created
June 6, 2014 15:48
-
-
Save jakefentress/07bf92ba37c92779a72c to your computer and use it in GitHub Desktop.
You can 'pause' and 'play' CSS animation by changing its animation-play-state property. Setting it to 'paused' stops your animation in place, until you change animation-play-state to running, for example on hover.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.animating_thing { | |
animation: spin 10s linear infinite; | |
animation-play-state: paused; | |
} | |
. animating_thing:hover { | |
animation-play-state: running; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment