爱易网
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 浏览次数:20563 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<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()*
上一篇:狡猾的按钮特效
下一篇:固定并可移动的层
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
迅雷再次在美提交IPO申请
三大运营商合建铁塔公司真相:未涉及电信业重组
蓝宝石PK大猩猩玻璃:作为屏幕谁更有优势?
云储存有多远:跨过数据安全问题即可到达
苹果收购Beats交易或将延期尚需解决5大问题
“合聚变”来了 UC优视确认并入阿里巴巴
360涉足搜索范围 百度市场份额面临应战
都是300元内 乐视盒子与小米盒子对比体验
中电信率先推移动转售业务 中下旬批量上市
推荐阅读
更多>
苹果音乐效劳新战略:与唱片商停止流媒体协作
总部大楼已换微软Logo:回忆诺基亚的兴衰史
AMD Q1净亏1.46亿美元 转战SOC拥抱ARM求变
中国电信内外受困 去电信化思绪待改
Android应用审核乱象:诈骗软件冲上排行榜首
解析2014年阿里百度等五大互联网巨头深度布局
中兴通讯不打机海战术 将向中高端手机转型
三星已经将Galaxy S5视为失败之作?
湘鄂情剥离餐饮业务进军大数据的底气在哪里?
刘强东向总理建言:打击有组织有规模的售假商家
微软谷歌高层访韩面前:忌惮三星的崛起
余额宝收益率跌破5% 银行系宝宝收益率赶超
苹果多色彩!葫芦里究竟卖的什么药
搜狐与奇虎360或结盟对抗BAT
苏宁易购成世界最慢电商 专家称其涉嫌违约
支付宝全面封杀比特币:充值码淘宝店或遭封禁
看,网络文学今日之繁盛;忆,纯真去哪了?
从旗下三大业务BG发展看华为的过去现在和未来
HTC与苹果三星距离扩展 C2B形式成新武器
联想国庆完成收购IBM x86服务器