我这里有2个图片跟岁鼠标移动的效果谁能跟我看下怎么才能让第1个象第2个那样移动缓慢的移动不要紧跟移动
我这里有2个图片跟岁鼠标移动的效果谁能跟我看下怎么才能让第1个象第2个那样移动缓慢的移动不要紧跟移动第一个
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<STYLE type=TEXT/CSS>
.tm {
FILTER: Alpha(Opacity=50)
}
</STYLE>
<DIV id=Layer1 style="HEIGHT: 31px; LEFT: 409px; POSITION: absolute; TOP: 131px; WIDTH: 14px;">
<IMG class=tm src="1186105809e5a581144d3409.jpg">
</DIV>
<SCRIPT LANGUAGE="JavaScript">
function move_layer()
{
var eX=event.clientX;
var eY=event.clientY;
if(event.clientX>document.body.clientWidth-60)
{
eX=document.body.clientWidth-60;
}
if(event.clientY>document.body.clientHeight-25)
{
eY=document.body.clientHeight-25;
}
if(event.clientX>501)
{
eX=501;
}
if(event.clientY>501)
{
eY=501;
}
if(event.clientY<189)
{
eY=189;
}
if(event.clientX<45)
{
eX=45;
}
Layer1.style.left=eX+document.body.scrollLeft+-500;
Layer1.style.top=eY+document.body.scrollTop+-500;
top.status="鼠标X="+eX + " sX=" + document.body.scrollLeft + " 鼠标Y=" + eY+ " sY=" + document.body.scrollTop;
}
document.onmousemove =move_layer;
</SCRIPT>
</body>
</html>
第二个
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.
<head>
<title>围绕鼠标旋转的三叶空间旋浆</title>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type">
</head>
<body bgColor="#000000">
<script
language="JavaScript">
<!--
//To add more stars simply add more colours in below array!!
colours=new Array('ff0000','00ff00','3366ff','ff00ff','ffa500','ffffff','fff000')
//Alter nothing below!!
amount=colours.length;
YgetDelay=0,XgetDelay=0,Ydelay=0,Xdelay=0,ns=(document.layers)?1:0,step=0.2,currStep=0,my=0,mx=0;
if (ns){
for (i=0; i < amount; i++)
document.write('<LAYER NAME="nsstars'+i+'" BGCOLOR='+colours[i]+' CLIP="0,0,2,2"></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('<span id="iestars" style="position:absolute;top:0;left:0;width:2px;height:2px;background:'+colours[i]+';font-size:2px"></span>');
document.write('</div></div>');
}
if (ns){
window.captureEvents(Event.MOUSEMOVE);
function nMouse(evnt){
my=evnt.pageY;mx=evnt.pageX
}
window.onMouseMove=nMouse;
}
else{
function iMouse(){
my=event.y;mx=event.x;
}
document.onmousemove=iMouse
}
function stars(){
if (!ns)ie.style.top=document.body.scrollTop;
for (i=0; i < amount; i++)
{
var layer=(document.layers)?document.layers["nsstars"+i]:iestars[i].style;
layer.top= Ydelay+100*Math.sin((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
layer.left=Xdelay+180*Math.cos((5*Math.sin((currStep-15.99)/10))+i*70)*Math.sin((currStep)/10)*Math.cos((currStep+i*25)/10);
}
currStep+=step;
}
function delay(){
Ydelay = YgetDelay+=(my-YgetDelay)*1/20;
Xdelay = XgetDelay+=(mx-XgetDelay)*1/20;
stars();
setTimeout('delay()',10);
}
delay();
//-->
</script>
<script language="JavaScript">
<!-- hide
function goHist(a)
{
history.go(a);
}
//-->
</script>
</body>
</html>