源代码:
谷歌主页动画.animate{
height:156px;
width:97px;
background:url(images/gumby11-gumby.jpg) no-repeat;
background-position:-15581px center;
}
$(function(){
var offset = -15678;
$('#start').click(function(){
var timer = setInterval(function(){
offset += 98;
$('#animate').css({
'background-position':offset + 'px center'
});
if(offset > 0){
clearInterval(timer);
}
},50);
$(this).hide();
});
});
其实这动画不难,难在那种图片上,不知道这图片是怎么做出来的!!!