星空网 > 软件开发 > Java

JS控制网页图片斜向滚动(图片除了上、下、左、右滚动,还有斜向滚动哦)

<html>
<head>
<title>图片斜向移动</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body background="http://p18.qhimg.com/t010e15dc26698ab2a8.png">
<script language="Javascript">
<!--
function selectAll(theField){
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
}
//-->
</script>
<script language="Javascript">
<!--
var background = "http://p18.qhimg.com/t010e15dc26698ab2a8.png";
var speed = 0;
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName != "Netscape" || browserVer >= 4.5) {
function moveback(movert,movedn,hPos,vPos) {
if (arguments[4])
document.body.style.backgroundImage = "url(\"" + arguments[4] + "\")";
if (arguments[5])
document.body.style.backgroundRepeat = arguments[5]
if (!isNaN(hPos)) {
if ((movert!=0) && (hPos>0)) hPos=-100000
hPos += movert
}
if (!isNaN(vPos)) {
if ((movedn!=0) && (vPos>0)) vPos=-100000
vPos+= movedn
}
document.body.style.backgroundPosition= hPos + " " + vPos
if (isNaN(hPos)) hPos = "\"" + hPos + "\""
if (isNaN(vPos)) vPos = "\"" + vPos + "\""
setTimeout("moveback("+movert+","+movedn+","+hPos+","+vPos+")",speed)
}
moveback(1,1,0,0, background);
}


//-->
</script>
<div>http://www.999jiujiu.com/</div>
</body>
</html>




原标题:JS控制网页图片斜向滚动(图片除了上、下、左、右滚动,还有斜向滚动哦)

关键词:JS

JS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流