Skip to content

Instantly share code, notes, and snippets.

@jakefentress
Created June 6, 2014 15:48
Show Gist options
  • Save jakefentress/07bf92ba37c92779a72c to your computer and use it in GitHub Desktop.
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.
.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