Skip to content

Instantly share code, notes, and snippets.

@SilentImp
Forked from LeaVerou/dabblet.css
Created March 26, 2014 16:16
Show Gist options
  • Save SilentImp/9787052 to your computer and use it in GitHub Desktop.
Save SilentImp/9787052 to your computer and use it in GitHub Desktop.
Анимация по hover (правильная)
/**
* Анимация по hover (правильная)
*/
div {
width: 9em;
padding: .6em 1em;
margin: 2em auto;
background: yellowgreen;
animation: spin 1s linear infinite;
animation-play-state: paused;
}
@keyframes spin {
to {
transform: rotate(1turn);
}
}
div:hover {
animation-play-state: running;
}
<div ontouchstart="">Наведи курсор и посмотри как я кручусь!</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment