求个在HTML加入图片飘窗的代码

求个在HTML加入图片飘窗的代码,第1张

<html>

<head>

<title>html-WEB开发</title>

</head>

<body>

<div id="img" style="position:absolutez-index=99">

<img src="http://www.alixixi.com/images/face/image21.gif" onClick="pause_resume()" border="0" alt='img' onload="return imgzoom(this,600)" onclick="javascript:window.open(this.src)" style="cursor:pointer"/>

</div>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var xPos = document.body.clientWidth-20

var yPos = document.body.clientHeight/2

var step = 1

var delay = 5

var height = 0

var Hoffset = 0

var Woffset = 0

var yon = 0

var xon = 0

var pause = true

var interval

img.style.top = yPos

function changePos() {

width = document.body.clientWidth

height = document.body.clientHeight

Hoffset = img.offsetHeight

Woffset = img.offsetWidth

img.style.left = xPos + document.body.scrollLeft

img.style.top = yPos + document.body.scrollTop

if (yon) {

yPos = yPos + step

}else {

yPos = yPos - step

}

if (yPos <0) {

yon = 1

yPos = 0

}

if (yPos >= (height - Hoffset)) {

yon = 0

yPos = (height - Hoffset)

}

if (xon) {

xPos = xPos + step

}else {

xPos = xPos - step

}

if (xPos <0) {

xon = 1

xPos = 0

}

if (xPos >= (width - Woffset)) {

xon = 0

xPos = (width - Woffset)

}

}

function start() {

img.visibility = "visible"

interval = setInterval('changePos()', delay)

}

function pause_resume() {

if(pause) {

clearInterval(interval)

pause = false

}else {

interval = setInterval('changePos()',delay)

pause = true

}

}

start()

// End -->

</script>

</body>

</html>

窗上弄土那个是山土或者土壤。根据查询相关资料显示,山土是一种混凝土,是由沙子、粉砂、水泥和少量水混合而成,具有良好的强度和质量,可用作墙壁、天花板和地面等建筑表面覆盖,一般用于外墙砌筑、飘窗上html代码修复、地下室装修、抗震加固以及替换传统石头等。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/6123671.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-03-15
下一篇2023-03-15

发表评论

登录后才能评论

评论列表(0条)

    保存