这里假定背景图片(open.gif)的宽和高为16px
<html>
<script>
setInterval("animate()",50)
var i=0,j=0
function animate(){
i--
j--
if(i==-16){i=0;j=0}
document.body.style.backgroundPosition=i+" "+j
}
</script>
<body background="open.gif">
</body>
</html>
<html>
<script>
setInterval("animate()",50)
var i=0,j=0
function animate(){
i--
j--
if(i==-16){i=0;j=0}
document.body.style.backgroundPosition=i+" "+j
}
</script>
<body background="open.gif">
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货