Skip to content

Instantly share code, notes, and snippets.

@benknight
Created May 25, 2012 05:26
Show Gist options
  • Save benknight/2785957 to your computer and use it in GitHub Desktop.
Save benknight/2785957 to your computer and use it in GitHub Desktop.
Infinite crawl effect using CSS animations
/**
* Infinite crawl effect using CSS animations
*/
@keyframes crawl {
0% { background-position: 0 0; }
100% { background-position: -1500px 0; /* 1500px = width of image */ }
}
#crawl {
background: url(http://f.cl.ly/items/2i3q0a123z3w17241Q3F/page-subheader.jpg);
height: 100px;
animation: crawl 60s infinite linear;
}
<div id="crawl"></div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment