Created
June 7, 2012 08:17
-
-
Save LeaVerou/2887366 to your computer and use it in GitHub Desktop.
Sprite Sheet animation with CSS3 using the steps() feature
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
/** | |
* Sprite Sheet animation with CSS3 using the steps() feature | |
* Simplified from simurai’s original example at http://jsfiddle.net/simurai/CGmCe/ | |
*/ | |
@keyframes wink { | |
from { background-position: 0px; } | |
to { background-position: -500px; } | |
} | |
body { | |
background: url("http://i.imgur.com/6za6I.png"); | |
animation: wink .8s steps(10, end) 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
{"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