Background image animation using css3 or jquery?
1 answer
Just a simple BG sprite image animation demo
http://jsbin.com/ohulok/1/edit
var c = 0 ;
function loop(){
c = ++c%5;
$('#bird').css({backgroundPosition: (240*c)+'px 0px'});
}
setInterval(loop, 42);
Info: if you want 24fps speed that's ~ 42 (41.666ms)
+3
source to share