1// use CSS3 @keyframes to animate the background-position
2@keyframes animatedBackground {
3 from {
4 background-position: 0 0;
5 }
6 to {
7 background-position: 100% 0;
8 }
9}
10#animate-area {
11 width: 200px;
12 height: 200px;
13 background-image: url(http://placekitten.com/400/200);
14 background-position: 0px 0px;
15 background-repeat: repeat-x;
16 animation: animatedBackground 10s linear infinite alternate;
17}
18
19<div id="animate-area"></div>