跟随鼠标的飞行物,不停的旋转,有点像星星。。
<html>
<head>
<meta name="keywords" content="站长,网页特效,js特效,广告代码,codesocang,codesocang.com,sky,www.codesocang.com,源码搜藏网" />
<meta name="description" content="www.codesocang.com,源码搜藏网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在源码搜藏网" />
<title>codesocang.com整理收集,欢迎来到源码搜藏网。</title>
</head>
<body>
<a href="http://www.codesocang.com/">源码搜藏网</a>,站长必备的高质量网页特效和广告代码。codesocang.com,站长js特效。<hr>
<!--欢迎来到源码搜藏网,我们网站收集大量高质量js特效,提供许多广告代码下载,网址:www.codesocang.com,codesocang@msn.com,用.net打造靓站-->
<script language="JavaScript">
<!--
if (document.all)
{
colours = new Array('ff0000', '00ff00', '3366ff', 'ff00ff', 'ffa500', 'ffffff', 'fff000')
amount = colours.length;
YgetDelay = 0, XgetDelay = 0, Ydelay = 0, Xdelay = 0, step = 0.2, currStep = 0, my = 0, mx = 0;
document.write('<div id="ie" style="position:absolute;top:0;left:0;"><div style="position:relative">');
for (i = 0; i < amount; i++)
document.write('<div id="iestars" style="position:absolute;top:0px;left:0px;height:50px;width:50px;font-family:Courier New;font-size:5px;color:' + colours[i] + ';padding-top:20px;text-align:center">.</div>');
document.write('</div></div>');
ini = 1;
gstep = 1;
function iMouse()
{
my = event.y; mx = event.x;
}
document.onmousemove = iMouse
function dim()
{
ini -= gstep;
dt = setTimeout('dim()', 10);
if (ini < 2)
{
clearTimeout(dt);
glow();
}
}
function glow()
{
ini += gstep;
gt = setTimeout('glow()', 10);
if (ini > 14)
{
clearTimeout(gt);
dim();
} //欢迎来到源码搜藏网,我们的网址是www.codesocang.com,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。
}
function stars()
{
ie.style.top = document.body.scrollTop;
for (i = 0; i < amount; i++)
{
var layer = iestars[i].style;
layer.filter = 'glow(color=' + colours[i] + ', strength=' + ini + ')';
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;
} //欢迎来到源码搜藏网,我们的网址是www.codesocang.com,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。
function delay()
{
Ydelay = YgetDelay += (my - YgetDelay) * 1 / 20;
Xdelay = XgetDelay += (mx - XgetDelay) * 1 / 20;
stars();
setTimeout('delay()', 10);
}
delay();
glow();
}
//-->
</script>
</body>
</html>
相关内容推荐