首页| 新闻| 娱乐| 游戏| 科普| 文学| 编程| 系统| 数据库| 建站| 学院| 产品| 网管| 维修| 办公| 热点
<!-- http://www.vevb.com --><!-- bbs http://bbs.vevb.com --><!--要完成此效果需要两个步骤第一步:把如下代码加入到<head>区域中--><SCRipT LANGUAGE="javaScript1.2">var intervals=2000var sparksOn = true;var speed = 40;var power = 3;var documentWidth=documentHeight=randomx=randomy=leftcorner=topcorner=0var ns=(document.layers);var ie=(document.all);var ns6=(document.getElementById&&!document.all);var sparksAflyin = false;var allDivs = new Array(10);var totalSparks = 0;function initAll(){ if(!ns && !ie &&!ns6){ sparksOn = false; return; }setInterval("firework()",intervals)if (ns) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE); for(dNum=0; dNum<7; ++dNum){ if(ie) allDivs[dNum]=eval('document.all.sDiv'+dNum+'.style'); else if (ns6) allDivs[dNum]=document.getElementById('sDiv'+dNum).style; else allDivs[dNum]=eval('document.layers["sDiv'+dNum+'"]'); }}function firework(){//below code detects the browser dimenionsif (ie){documentWidth=document.body.clientWidthdocumentHeight=document.body.clientHeightleftcorner=document.body.scrollLefttopcorner=document.body.scrollTop}else if (ns||ns6){documentWidth=window.innerWidthdocumentHeight=window.innerHeightleftcorner=pageXOffsettopcorner=pageYOffset}//below code randomly generates a set of coordinates that fall within the dimensionrandomx=leftcorner+Math.floor(Math.random()*documentWidth)randomy=topcorner+Math.floor(Math.random()*documentHeight) if(sparksOn){ if(!sparksAflyin){ sparksAflyin=true; totalSparks=0; for(var spark=0;spark<=6;spark++){ dx=Math.round(Math.random()*50); dy=Math.round(Math.random()*50); moveTo(spark,randomx,randomy,dx,dy); } } }}function moveTo(i,tempx,tempy,dx,dy){ if(ie){ if(tempy+80>(document.body.offsetHeight+document.body.scrollTop)) tempy=document.body.offsetHeight+document.body.scrollTop-80; if(tempx+80>(document.body.offsetWidth+document.body.scrollLeft)) tempx=document.body.offsetWidth+document.body.scrollLeft-80; } else if(ns6){ if(tempy+80>(window.innerHeight+pageYOffset)) tempy=window.innerHeight+pageYOffset-80; if(tempx+80>(window.innerWidth+pageXOffset)) tempx=window.innerWidth+pageXOffset-80; } if(tempx>-50&&tempy>-50){ tempx+=dx;tempy+=dy; allDivs[i].left=tempx; allDivs[i].top=tempy; dx-=power;dy-=power; setTimeout("moveTo("+i+","+tempx+","+tempy+","+dx+","+dy+")",speed) } else ++totalSparks if(totalSparks==7){ sparksAflyin=false; totalSparks=0; }}window.onload=initAll</script><style>#sDiv0 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:Aqua; z-index:9;}#sDiv1 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:red; z-index:10;}#sDiv2 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:blue; z-index:11;}#sDiv3 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:orange; z-index:12;}#sDiv4 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:yellow; z-index:13;}#sDiv5 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:lightgreen; z-index:14;}#sDiv6 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:silver; z-index:15;}</style><!--第二步:把如下代码加入到<body>区域中--><div id="sDiv0">*</div><div id="sDiv1">*</div><div id="sDiv2">*</div><div id="sDiv3">*</div><div id="sDiv4">*</div><div id="sDiv5">*</div><div id="sDiv6">*</div>
Intel工程样品CPU的识别方法
图解CMOS路线和硬盘光驱跳线的
硬盘分区如何设置准确的分区空间
回眸一笑百魅生,六宫粉黛无颜色
岁月静美,剪一影烟雨江南
芜湖有个“松鼠小镇”
小满:小得盈满,一切刚刚好!
一串串晶莹剔透的葡萄,像一颗颗宝石挂在藤
正宗老北京脆皮烤鸭
人逢知己千杯少,喝酒搞笑图集
搞笑试卷,学生恶搞答题
新闻热点
疑难解答
图片精选
微信小程序各种坑?填坑tip
web前端如何让网页布局稳定性和标
CSS定位深入理解 完全掌握CSS定位
彻底理解浮动float CSS浮动详解 清
网友关注