hujingjian 发表于 2007-4-27 11:27:52

***图形特效***大雁南飞(请注意改变图片)

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
脚本说明:
第一步:把如下代码加入<body>区域中
<script language="javascript">
<!--
amount=7;
function pre(){
img0=new image();
img0.src="0109bbat1.gif";
img1=new image();
img1.src="0109bbat2.gif";
img2=new image();
img2.src="0109bbat3.gif";
settimeout('pre()',3000)
}
brwsr=(document.layers)?1:0;
if (brwsr){
window.captureevents(event.mousemove);
for (i=0; i < amount; i++)
document.write("<layer name=n"+i+" left=0 top=-50><img src='0109bbat1.gif' name='nsi'>http://code.ik8.com/html/0109bbat1.gif</layer>");
}
else{
document.write('<div id="ie" style="position:absolute;top:0;left:0"><div style="position:relative">');
for (i=0; i < amount; i++)
{document.write('<img name="msiebats" src="0109bbat1.gif" style="position:absolute;top:-50;left:0">')}
document.write('http://code.ik8.com/html/0109bbat1.gif</div></div>');
}
bats=new array('0109bbat1.gif','0109bbat2.gif','0109bbat3.gif','0109bbat2.gif')
xpos=0;
ypos=-50;
ybase=0;
xbase=0;
step=0.5;
currstep=0;
a_count=0;
b_count=1;
c_count=2;
move=1;
if (brwsr){
function nsmousefollow(evnt){
xpos = evnt.pagex;
ypos = evnt.pagey;
}
window.onmousemove = nsmousefollow;
}
else{
function msiemousefollow(){
xpos = event.x;
ypos = event.y;
}
document.onmousemove = msiemousefollow;
}
function swirl(){
if (!brwsr)ie.style.top=document.body.scrolltop;
ybase=(document.layers)?window.innerheight/3:window.document.body.offsetheight/3;
xbase=(document.layers)?window.innerwidth/7:window.document.body.offsetwidth/7;
for (i=0; i < amount; i++){
var layer=(document.layers)?document.layers["n"+i]:msiebats.style;
layer.top = ypos+ybase*math.sin(((currstep)+i*3.7)/4)*math.cos((currstep+i*35)/20)
layer.left =xpos+xbase*math.cos(((currstep)+i*3.7)/4)*math.cos((currstep+i*35)/62)
}
currstep+=step;
}
function animate(){
if (a_count == bats.length) a_count=0;
if (b_count == bats.length) b_count=0;
if (c_count == bats.length) c_count=0;
if (brwsr){
document.layers['n'+0].document.images['nsi'].src=bats;
document.layers['n'+1].document.images['nsi'].src=bats;
document.layers['n'+2].document.images['nsi'].src=bats;
}
else{
msiebats.src=bats;
msiebats.src=bats;
msiebats.src=bats;
}
if (amount > 2)
{
for (i=3; i < amount; i++)
{
if (brwsr)
document.layers['n'+i].document.images['nsi'].src=bats;
else
msiebats.src=bats;
}
}
a_count+=move;
b_count+=move;
c_count+=move;
swirl();
settimeout('animate()',30)

}
//-->
</script>


第二步:把<body>中的内容改为:
<body bgcolor=#000000" onload="pre();animate()">

      










--------------------------------------

http://www.huoyue.com.cn 活跃网,活跃人群的论坛,访问活跃网,将给您带来意想不到的收获,还可以免费为您开论坛,让您免费拥有与朋友、网友交流的论坛。你是年轻人吗?你活跃你就上!
页: [1]
查看完整版本: ***图形特效***大雁南飞(请注意改变图片)