爱易网
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 浏览次数:20608 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<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()*
上一篇:狡猾的按钮特效
下一篇:固定并可移动的层
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
承载京东C2C野心的拍拍网:梦想丰满,现实骨感
传谷歌开发者大会发布Android 4.3 并非5.0版本
淘宝公布新规:升级售假卖家惩罚力度
中移动财报外的"五座大山":运营商沦为走秀陪衬
国内首个大数据系列指数今日发布
二维码支付大战的号角注定已经吹响,尚需标准发放
酷派首抓4G时机大丰收,未来份额必降无疑
京东封杀财付通:终极目标是电商生态圈
FDD牌照短期不会发放 联通电信暗自提速建网
推荐阅读
更多>
传苹果与雅虎协作信息提供 进一步摆脱谷歌
地图导航骤起杀机 百度高德重新定义商业模式
苹果联合创始人炮轰鲍尔默“一直都在吃老本”
固话上网卡或将实名制 运营商泄露用户信息将被罚
“组合拳”怎么打 拆解小米新玩法
公信力消失:马航事件社交媒体传播之痛
阿里入股虎嗅:媒体的脊梁弯了?未必!
众贷网满月开张 网络金融监管再受质疑
中国首台比特币ATM登陆上海 可购买不可兑换现钞
腾讯再次重申:普通微信誉户相对不收费
虚拟运营商前路迷茫 业界建议发力车联网
谷歌新技术进入iOS平台:将叫板苹果Siri
易信工具性优势突出 丁磊三板斧或先砍在飞信上
前苹果顾问批判iPhone命名:不应加S
戴尔新CEO名单曝光:惠普甲骨文高管在列
微信今天大面积崩溃 腾讯:因光缆施工被挖断
国美电商开打价钱战 牟贵先言行矛盾受质疑
亚马逊推特价闪购纪念入华十周年 总裁一职仍空缺
奇虎360证明了“惟平台化才能生存”是谬论,中国互联网不能少了周鸿祎
IT时代周刊总编辑曹健:投资人刘志硕印象记