返回主页网页素材图库gif动画图库网页模板网页教程网页特效网页背景音乐网页制作软件下载网页设计字体下载透明FLASH素材
 


网页鼠标特效
围绕鼠标跳舞的文字:一段文字围绕鼠标跳舞,真是有趣
效果演示:
把如下代码加入<head>区域中
<SCRIPT language=javascript>
<!--//This is a JS program for Suhoo homepage.All rights reserved.
var cx=0;
var cy=0;
var val=0;
function locate()
{ cx=window.event.x;
cy=window.event.y;

}
document.onmousemove=locate;
function follow(i)
{ var x;
if(i<4)x=cx-50+i*10;
else x=cx-25+i*10;
var y=cy-20+Math.floor(Math.random()*40);
w=eval("word"+i);
with(w.style)
{
left=x.toString()+"px";
top=y.toString()+"px";
}
}
function show(i)
{
var w=eval("word"+i);
with(w.style)
{
visibility="visible";
s=parseInt(fontSize);
if(s>=200)s-=100;
else if(s>90&&s<=100)
{
s-=85;
clearInterval(val);
if(i<5)val=setInterval("show("+(i+1)+")",20);
}
fontSize=s;
}

}
function start()
{ for(i=1;i<=5;i++)
{
val=setInterval("show(1)",20);
setInterval("follow("+i+")",100);

}
}

//-->
</SCRIPT>
<SCRIPT language=javascript>
var word=new Array(5);
word[1]="我";word[2]="爱";word[3]="你";word[4]="技";word[5]="巧";
for(i=1;i<=5;i++)
document.write("<div id='word"+i+"' style='width:20px;height:20px;position:absolute;font-size:1000;visibility:hidden'><font face='Forte' color='#00FF00'>"+word[i]+"</font></div>");start();

</SCRIPT>

 友情连接
 
© CopyRight 2002-2003, www.dabaoku.com, Inc. All Rights Reserved