animate循环动画---兼容ie8

.fd-guang{
width: 326px;
height: 23px;
background: url("../images/guang_07.png") no-repeat left top;
position: absolute;
left:0;
top: 0;
}

var css = {top:'210px'};
$('.fd-guang').animate(css,3000,rowBack);
function rowBack(){
if(css.top==='0px'){
css.top='210px';
}else if(css.top==='210px'){
css.top='0px';
}
$('.fd-guang').animate(css,3000,rowBack);
}
posted @ 2017-04-14 15:24  敷衍轻笑  阅读(3004)  评论(0编辑  收藏  举报