Skip to content

Instantly share code, notes, and snippets.

@martinkean
Last active July 4, 2016 06:12
Show Gist options
  • Save martinkean/c41461b5c26575e069b0b0411cfc610b to your computer and use it in GitHub Desktop.
Save martinkean/c41461b5c26575e069b0b0411cfc610b to your computer and use it in GitHub Desktop.
Walker
/**
* 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;}
}
<!-- content to be placed inside <body>…</body> -->
<div class="sprite"></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