首页
微信
安卓
接口
移动
前端
专题
文档库
工具
网址
§
ITPOW
>>
文档
>>
JavaScript
>>
窗口页面
非常酷的螺旋特效(推荐)
作者: 来源: 日期:2004-9-30
<table border=0 cellpadding=0 cellspacing=0 width="100%"> <tr> <td align=right> <script language="javascript"><!-- an=navigator.appName;d=document;function pr(){d.write("<img src=\"http://t0.extreme-dm.com", "/0.gif?tag=cuaanet&j=y&srw="+srw+"&srb="+srb+"&", "rs="+r+"&l="+escape(d.referrer)+"\" height=1 ", "width=1>");}srb="na";srw="na";//--> </script><script language="javascript1.2"><!-- s=screen;srw=s.width;an!="Netscape"? srb=s.colorDepth:srb=s.pixelDepth;//--> </script><script language="javascript"><!-- r=41;d.images?r=d.im.width:z=0;pr();//--> </script> </td> </tr> </table> <SCRIPT language=JavaScript> if (document.all){ with (document){ write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:1px;height:1px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:2px;height:2px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:2px;height:2px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:3px;height:3px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:3px;height:3px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:3px;height:3px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:3px;height:3px;background:#006600;font-size:1px;visibility:visible"></div>') write('<div style="position:relative;width:5px;height:5px;background:#990000;font-size:2px;visibility:visible"></div>') write('<div style="position:relative;width:5px;height:5px;background:#330099;font-size:2px;visibility:visible"></div>') write('<div style="position:relative;width:5px;height:5px;background:#006699;font-size:2px;visibility:visible"></div>') write('<div style="position:relative;width:5px;height:5px;background:#006600;font-size:2px;visibility:visible"></div>') write('<div style="position:relative;width:5px;height:5px;background:#FFFF00;font-size:2px;visibility:visible"></div>') write('<div style="position:relative;width:5px;height:5px;background:#FF9900;font-size:2px;visibility:visible"></div>') write('<div style="position:relative;width:6px;height:6px;background:#FF3300;font-size:3px;visibility:visible"></div>') write('</div>') } } if (document.layers) var yBase = 300; var xBase = 300; var step = 1; var currStep = 0; var Xpos = 380; var Ypos = 70; if (document.all) { function MoveHandler() { Xpos = document.body.scrollLeft+event.x; Ypos = document.body.scrollTop+event.y; } ; } else if (document.layers) { function xMoveHandler(evnt) { Xpos = evnt.pageX; Ypos = evnt.pageY; } window.onMouseMove = xMoveHandler; } function animateLogo() { if (document.all) { yBase = window.document.body.offsetHeight/6; xBase = window.document.body.offsetWidth/6; } else if (document.layers) { yBase = window.innerHeight/8; xBase = window.innerWidth/8; } if (document.all) { for ( i = 0 ; i < starsDiv.all.length ; i++ ) { starsDiv.all[i].style.top = Ypos + yBase*Math.sin((currStep + i*4)/12)*Math.cos(400+currStep/200); starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep + i*3)/10)*Math.sin(currStep/200); } } else if (document.layers) { for ( j = 0 ; j < 14 ; j++ ) //number of NS layers! { var templayer="a"+j document.layers[templayer].top = Ypos + yBase*Math.sin((currStep + j*4)/12)*Math.cos(400+currStep/200); document.layers[templayer].left = Xpos + xBase*Math.sin((currStep + j*3)/10)*Math.sin(currStep/200); } } currStep+= step; setTimeout("animateLogo()", 10); } animateLogo(); </SCRIPT>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
相关文章
创建于2005年
渝ICP备05010272号-1
电邮:
cftea@126.com
即将跳转...