Last active
July 4, 2016 06:12
-
-
Save martinkean/c41461b5c26575e069b0b0411cfc610b to your computer and use it in GitHub Desktop.
Walker
This file contains hidden or 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
/** | |
* Walker | |
*/ | |
/* These exercises are for teaching purposes only. */ | |
/* With thanks to Val Head and Lynda.com for providing the code and images http://www.lynda.com/CSS-tutorials/CSS-Animations/115434-2.html */ | |
.sprite { | |
width:500px; | |
height:500px; | |
display:block; | |
background:transparent url(http://martinkean.com/kidscon/walker/walker_frames.png) 0 0 no-repeat; | |
margin:3em auto; | |
//animation: walker 2s steps(10) infinite; | |
} | |
@keyframes walker { | |
0% {background-position: 0 0;} | |
100% {background-position: 0 -5000px;} | |
} |
This file contains hidden or 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
<!-- content to be placed inside <body>…</body> --> | |
<div class="sprite"></div> |
This file contains hidden or 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 hidden or 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