爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
页面闪电效果
页面闪电效果
日期:2014-05-18 浏览次数:20598 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<body>区域中 <SCRIPT> <!-- ie4=document.all?1:0; ns4=document.layers?1:0; ns5=(document.getElementById && !document.all)?1:0; function init(){ // Bolt has an aura? (true | false) // takes twice as long to strike aura=false; bcolor="white"; acolor="blue"; // Make background color flash? (true | false) flash=true; skyNorm="black"; skyFlash="#000050"; if (flash) document.bgColor=skyNorm; // nbs = Number of main bolt segments nbs = 50; ct=0; // Font sizes for lightning bolt and aura segments fsb=shi*.3; fsf=shi*.2; fsbi=shi*.2; fsfi=shi*.12; fsbii=shi*.12; fsfii=shi*.07; xpos=cswi; ypos=0; if (ns5) ark = document.getElementById("ark"); if (ns4) { ol=document.layers["ark"]; ol = new Layer(swi); ol.left = 0; ol.top = 0; ol.height = shi; ol.zIndex=1; ol.visibility = "hide"; ret="<STYLE TYPE='text/css'>"; for (i=1;i<10;i++){ ret+="DIV.bolt"+i+" {position:absolute; font-style:'Times New Roman'; font-size:"+(fsf*i/9)+"px; color:"+bcolor+"; visibility:inherit; z-index:1}"; if (aura) ret+="DIV.bolta"+i+" {position:absolute; font-style:'Times New Roman'; font-size:"+(fsf*1.3*i/9)+"px; color:blue; visibility:inherit; z-index:0}"; } ret+="</STYLE>"; for (fs=1;fs<10;fs++) for (i=1;i<nbs;i++) { if (aura) ret+="<DIV id=a"+i+"f"+fs+" class=bolta"+fs+">.</DIV>"; ret+="<DIV id=s"+i+"f"+fs+" class=bolt"+fs+">.</DIV>"; } //ol.document.open(); ol.document.write(ret); ol.document.close(); } Time1=setTimeout("mainplot()",100); } function mainplot() { lang=0; xpos=Math.random()*cswi+cswi/2; ypos=0; fs=9; fsi=8 deg=Math.random()*30-15+((xpos<cswi)? +15:-15); jag=Math.round(Math.random()*100)/100; zag=Math.round(Math.random()*100)/100; cur=Math.round((.5 * (Math.random()*10-5))*100)/100; ion=(Math.random()>.5)? 1:-1; //status=" "+ct+" Divs "+format(jag)+" jag "+format(zag)+" zag "+cur+" curve"; ct=0; if (ns4) { for (i=1;i<nbs;i++) { ang=Math.random()*jag*90-jag*45; if (Math.random()+.05>zag) lang=Math.random()*zag*90-zag*45; ang+=lang; ct++; if (Math.random()*10>9.5 && fsi>1) {fsi--; leg1();} xpos+=Math.sin((deg+(ang+i*cur))/57.3)*(fsf*fs/9)*.07; ypos+=Math.abs(Math.cos((deg+(ang+i*cur))/57.3)*(fsf*fs/9)*.07); //fsb=fsf*1.5; if (aura) { ol.document.layers["a"+i+"f"+fs].moveTo(xpos-(fsf*1.3*fs/9)*.125,ypos-(fsf*1.3*fs/9)*.85); ct++;} ol.document.layers["s"+i+"f"+fs].moveTo(xpos-(fsf*fs/9)*.125,ypos-(fsf*fs/9)*.85); if (ypos>shi || xpos<0 || xpos>swi) i=nbs; } //status=" "+ct+" Divs "+format(jag)+" jag "+format(zag)+" zag "+cur+" curve"; ol.resizeTo(swi,shi); Time1=setTimeout("light()",100); } if (ie4 || ns5) { // Rewriting layers can be faster than repositioning in internet explorer ret=""; fsf=shi*.2; for (i=1;i<nbs;i++) { ang=Math.random()*jag*90-jag*45; if (Math.random()+.05>zag) lang=Math.random()*zag*90-zag*45; ang+=lang; ct++; if (Math.random()*10>9.5) {fsfi=fsf*.6; fsf*=.95; leg1();} xpos+=Math.sin((deg+(ang+i*cur))/57.3)*fsf*.07; ypos+=Math.abs(Math.cos((deg+(ang+i*cur))/57.3)*fsf*.07); fsb=fsf*1.3; if (ypos>shi || xpos<0 || xpos>swi) i=nbs; if (aura) { ret+="<DIV id='darg"+i+"' style='position:absolute; left:"+(xpos-fsb*.125)+"; top:"+(ypos-fsb*.85)+"; font-size:"+fsb+"px; color:rgb(0,0,255); z-Index:0' >.</DIV>"; ct++;} ret+="<DIV style='position:absolute; left:"+(xpos-fsf*.125)+"; top:"+(ypos-fsf*.85)+"; font-size:"+fsf+"px; color:"+bcolor+"; z-Index:1' >.</DIV>"; } //status=" "+ct+" Divs "+format(jag)+" jag "+format(zag)+" zag "+cur+" curve"; ark.innerHTML=ret; Time1=setTimeout("lightie()",100); } } function leg1() { xpo=xpos; ypo=ypos; lang=zag*ion*(30+Math.random()*20-10); ion*=-1; lang1=0; deg1=deg+ion*50+Math.random()*
上一篇:狡猾的按钮特效
下一篇:固定并可移动的层
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
迪信通神秘免费服务揭谜底:充电宝免费带回家
金山毒霸安全中心: XP退役后首个高危漏洞来了
HDS发布《2013中国CIO洞察白皮书》
“宽带中国”计划已正式上升为国家战略
惠普中国转型只是缩影 未来开展不可预期
人们为什么总愿尝试新社交网络?
任正非:喜马拉雅山的水为什么不能流入亚马逊河?
逆转猜想:如果阿里成为雅虎大股东会怎样?
9月1日起免征新能源汽车购置税
推荐阅读
更多>
十亿美元的告别礼:三星为何要大举重组?
三大运营商合建铁塔公司真相:未涉及电信业重组
广电总局回应美剧下架:不是所有信息可公开
成本效益全兼顾 混合云市场前景显现
运营商补贴减少 国内通信业拐点逼近
三星已经将Galaxy S5视为失败之作?
组建铁塔公司倒逼运营商改革 或加速4G网建设
北京今日实现用支付宝钱包为公交卡充值
Line风靡亚洲,在北美却进展缓慢
途牛旅游网今晚挂牌纳斯达克 融资1亿美元
广东移动董事长徐龙受调查 圈内对其褒贬不一
小米打响手机价格战 为米3铺路或另有所图
微软小冰复活再战移动端:改与米聊、易信和触宝合作
国内首个大数据系列指数今日发布
完美入股盛大:一桩各怀心事的交易
国美电商开打价钱战 牟贵先言行矛盾受质疑
说说这一个月的赌球输了多少
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
快递企业征收“份子钱” 成全了谁 苦了谁?
探析APP移动营销发扬实效的微妙