fazlurr
6/22/2014 - 2:38 PM

Animation on hover (wrong way)

Animation on hover (wrong way)

{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
// alert('Hello world!');
<div ontouchstart="">Hover over me and watch me spin!</div>
/**
 * 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;
}