Created
January 9, 2014 13:58
-
-
Save LeaVerou/8334474 to your computer and use it in GitHub Desktop.
Animation on hover (wrong way)
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
/** | |
* 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; | |
} |
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
<div ontouchstart="">Hover over me and watch me spin!</div> |
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
// alert('Hello world!'); |
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
{"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