1、怎样使网页首页的图片随意飘动
"<body background="photo/24.jpg" style="background-attachment: fixed" OnLoad="www_helpor_net()" OnResize="www_helpor_net()">
2、如何让图片在网页上飘动?急!
s是小广告吧 用DIV绘制一个适当大小的层然后设置时间轴来确定层的移动方向 完了以后在文档窗口左下角标签选择器中选中<body>标签按SHIFT+F4打开行为面板 单击添加行为按钮 在弹出的菜单中选择 时间轴/播放时间轴的命令在打开的播放时间轴对话框中选择目标时间轴对象。 老大全手打啊 多给点分啊 如果还不是很明白 给我发消息吧
3、网页设计中制作漂浮图片,怎样能使鼠标经过的时候停止?
document.writeln("<div id=\"ad\" style=\"position:absolute\"><embed src=\"http://www.okzhuhai.com\/adbanner\/mhsc070501.swf\" quality=\"high\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" type=\"application\/x-shockwave-flash\" width=\"200\" height=\"118\"><\/embed><\/div>");
document.writeln(" <script>");
document.writeln(" var x = 600,y = 80");
document.writeln(" var xin = true, yin = true");
document.writeln(" var step = 2 ");
document.writeln(" var delay = 20");
document.writeln(" var obj=document.getElementById(\"ad\") ");
document.writeln(" function floatAD() {");
document.writeln(" var L=T=0");
document.writeln(" var R= document.body.clientWidth-obj.offsetWidth");
document.writeln(" var B = document.body.clientHeight-obj.offsetHeight");
document.writeln(" obj.style.left = x + document.body.scrollLeft");
document.writeln(" obj.style.top = y + document.body.scrollTop");
document.writeln(" x = x + step*(xin?1:-1) ");
document.writeln(" if (x < L) { xin = true; x = L} ");
document.writeln(" if (x > R){ xin = false; x = R} ");
document.writeln(" y = y + step*(yin?1:-1) ");
document.writeln(" if (y < T) { yin = true; y = T } ");
document.writeln(" if (y > B) { yin = false; y = B } ");
document.writeln(" }");
document.writeln(" var itl= setInterval(\"floatAD()\", delay) ");
document.writeln(" obj.onmouseover=function(){clearInterval(itl)} ");
document.writeln(" obj.onmouseout=function(){itl=setInterval(\"floatAD()\", delay)}");
document.writeln(" <\/script>")
t.writeln(" <\/script>")
将以上代码保存为 move2.js 在需要漂浮的页面调用即可。调用方法:
<SCRIPT language=javascript src="/images/move2.js"></SCRIPT>将此插入到网页head区域即可。
4、如何用dreamwear在网页上添加可飘动的图片?
Copy他们网站的JS代码喽~
5、求网页图片飘动的效果代码
<div id="img" style="position:absolute; left:35px; top:556px; width:120; background-color:#FFFFFF;" class="fudong">
这里面加你自己的东西
</div>
<SCRIPT LANGUAGE="JavaScript">
var xPos = 15;
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 start() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();
</script>
6、网页设计怎样使图片在网页中任意的飘来飘去,例如广告图片之类的
那个要用到一个JS代码。上面的连接地址和图片可以自行更改! <div id="codefans_net" style="position:absolute"> <!--链接地址--><a href=" http://www.soso.com/" target="_blank"> <!--图片地址--><img src="/images.gif" width="160" height="95" border="0"> </a></div> <script> var x = 50,y = 60 var xin = true, yin = true var step = 1 var delay = 10 var obj=document.getElementById("codefans_net") function float() { var L=T=0 var R= document.body.clientWidth-obj.offsetWidth var B = document.body.clientHeight-obj.offsetHeight obj.style.left = x + document.body.scrollLeft obj.style.top = y + document.body.scrollTop x = x + step*(xin?1:-1) if (x < L) { xin = true; x = L} if (x > R){ xin = false; x = R} y = y + step*(yin?1:-1) if (y < T) { yin = true; y = T } if (y > B) { yin = false; y = B } } var itl= setInterval("float()", delay) obj.onmouseover=function(){clearInterval(itl)} obj.onmouseout=function(){itl=setInterval("float()", delay)} </script>
7、怎样写在页面飘动的图片(我想要个详细代码)谢谢了,大神帮忙啊
移动图片的代码 <marquee><img src="/Article/UploadFiles/200510/20051018112706401.jpg";><img src="/Article/UploadFiles/200510/20051018112712361.jpg";><img src="/Article/UploadFiles/200510/20051018112712874.jpg";><marquee> 把里面的图片地址换成你的就行 想多放一个图片就按照格式在中间插入: <img src="/Article/UploadFiles/200510/20051018112712361.jpg";> 里面的图片地址自己定。 打开网站的时候自己做一个弹出窗口的广告 <script language="javascript"> var TimerID=1; window.open('http://163.com','','width=600,height=300,left=100,top=50'); </script> 里面的 http://163.com 这个是你预先做好的一个网页,后面的数字是调节大小和位置的,你自己多试验几次