打印

请帮忙!网页上移动图片连接效果怎么做?

http://www.csust.cn/
如这个上面的!!
先谢谢了!!
没人知道吗???
还是这个问题太简单,都不屑于回答!
按一般的图片链接一样做
我佛山人在上个帖子中说
引用:
按一般的图片链接一样做
谢谢 我佛山人
但我还是不清楚。就是那图片在整个网页中移动是怎么实现的呢?
能给出代码吗?

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!
不知这个代码你满意否??~~~
复制内容到剪贴板
代码:
var the_loc_url="http://localhost/";
var the_pic_url="http://localhost/images/logo_8831.gif";
document.write("<div id=\"img" style=\"position:absolute;\">");
document.write("<a href=\""+the_loc_url+"\" target=\"_blank\">");
document.write("<img src=\""+the_pic_url+"\" border=\"0\"></a>");
document.write("</div>");
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
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 www_helpor_net() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
www_helpor_net();
//For more,visit:www.helpor.net
研討技術無邊界 廣交各位好友!
QQ:160668
------欢迎来我的个人网站参观:http://www.imaro.net------

TOP

谢谢拉
我去调试一下!

TOP