Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created January 9, 2014 13:58
Show Gist options
  • Save LeaVerou/8334474 to your computer and use it in GitHub Desktop.
Save LeaVerou/8334474 to your computer and use it in GitHub Desktop.
Animation on hover (wrong way)
/**
* Animation on hover (wrong way)
*/
div {
width: 9em;
padding: .6em 1em;
margin: 2em auto;
background: yellowgreen;
}
@keyframes spin {
to {
transform: rotate(1turn);
}
}
div:hover {
animation: spin 1s linear infinite;
}
<div ontouchstart="">Hover over me and watch me spin!</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment