爱易网
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 浏览次数:20578 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<body>区域中 <!--[if IE ]> <style type="text/css"> body { overflow: hidden; } v\:* { behavior: url(#default#VML); } </style> <![endif]--> <!--[if IE ]> <script language="JavaScript"> colors = new Array(); // Define your own color combinations colors[0] = new Array('yellow', 'lime'); colors[1] = new Array('silver', 'green') colors[2] = new Array('silver', 'blue'); colors[3] = new Array('silver', 'purple'); colors[4] = new Array('purple', 'white'); colors[5] = new Array('blue', 'silver'); colors[6] = new Array('red', 'fuchsia'); colors[7] = new Array('yellow', 'red'); // Define the maximum number of fire arrows maximum = 1000; vmlobj=''; for(i = 0; i < 12; i++){ vmlobj += '<div id="ster'+i+'" style="position:absolute; left:-50px; top-50px; visibility:hidden; z-index:50;">'; vmlobj += '<v:shape style="width:15px; height:15px;" fillcolor="yellow" coordorigin="0,0" coordsize="200 200">'; vmlobj += '<v:path v="m 8,65 l 72,65, 92,11, 112,65, 174,65, 122,100, 142,155,92,121, 42,155, 60,100 x e"/>'; vmlobj += '<v:stroke on="false" /></v:shape></div>'; } document.write(vmlobj); vmlobj = null; aantal = 0; function begin() { try { if(aantal == maximum){ return;} kleurschema = Math.floor(Math.random() * colors.length); posLinks = Math.floor(Math.random() * (document.body.clientWidth - 180)); posLinks = (posLinks < 170)? 170: posLinks; posBoven = Math.floor(Math.random() * (document.body.clientHeight - 180)); posBoven = (posBoven < 170)? 170: posBoven; straal = 0; uiteen = true; teller = 1; flikkereffect = false; for(var i = 0; i < 12; i++){ document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][0]); document.getElementById('ster'+i).style.visibility = 'hidden'; // 5.0 fix document.getElementById('ster'+i).style.left = posLinks; document.getElementById('ster'+i).style.top = posBoven; } document.getElementById('ster0').style.top = (document.body.clientHeight - 20); document.getElementById('ster0').style.visibility = 'visible'; omhoog(); } catch(e){} } function omhoog() { try { positie = parseInt(document.getElementById('ster0').style.top); if(positie > posBoven){ document.getElementById('ster0').style.top = (positie - 25); setTimeout('omhoog()', 50); } else { for(i = 1; i < 12; i++){ document.getElementById('ster'+i).style.top = positie; document.getElementById('ster'+i).style.visibility = 'visible'; } uiteenspatten(); } } catch(e){} } function uiteenspatten() { try { if(straal > 120 && straal % 10 == 0){ flikkereffect = true; teller = (teller == colors[kleurschema].length)? 0: (teller+1); } for(var i = 0; i < 12; i++){ var hoek = i * 30; var piHoek = Math.PI - Math.PI / 180 * hoek; var links = posLinks + Math.round(straal * Math.sin(piHoek)); var boven = positie + Math.round(straal * Math.cos(piHoek)); document.getElementById('ster'+i).style.left = links; document.getElementById('ster'+i).style.top = boven; if(flikkereffect){ document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][teller]); } } if(straal < 160 && uiteen){ straal += (straal < 120)? 10: 5; setTimeout('uiteenspatten()', 50); } else if(straal > 120){ uiteen = false; straal -= 5; setTimeout('uiteenspatten()', 50); } else if(straal <= 120){ for(var i = 0; i < 12; i++){ document.getElementById('ster'+i).style.visibility = 'hidden'; } aantal++; setTimeout('begin()', 500); } } catch(e) {} } window.onload=begin;
上一篇:狡猾的按钮特效
下一篇:模拟下雪景象
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
微软不会被颠覆
IT企业人才争夺战打响:员工待遇水涨船高
苹果App Store被大量刷榜:iTunes账号成帮凶
亚马逊Fire Phone:请别拿我跟苹果三星比
前苹果顾问批判iPhone命名:不应加S
中兴通讯不打机海战术 将向中高端手机转型
腾讯为何在与阿里百度的收购比赛中当看客?
喜大普奔:2016年国内乘客有望在飞机上使用手机
同程旅游融资后变土豪 如何烧钱占领市场?
推荐阅读
更多>
同为70前后人,马云为什么总是像外星人那么瘦
传苹果中移动达成协议:新iPhone兼容TD制式
新闻早8点》Facebook失手发布Snapchat类应用
传谷歌开发者大会发布Android 4.3 并非5.0版本
英特尔涉嫌垄断 欧盟或开出史上最高罚单
戴尔新CEO名单曝光:惠普甲骨文高管在列
三星起诉LG在冰箱广告中玷污其企业笼统
《中国三网融合业务运营管理》研讨报告征订函
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
TD是完成中国梦的一个契机
特斯拉将获上海免费牌照 充电桩面临双重标准
宽带中国战略明确 运营商建设成本超6000亿
微软最后的救命稻草Win 8份额继续上升
为啥苹果定要出廉价iPhone?都是安卓逼的
诺基亚称不会更名“微软移动” 5月还将发布新品
三星石墨烯制备技术获突破
英特尔IDF峰会启示:释放移动互联的信号
聚美优品获基石投资1.5亿美金,IPO吃下定心丸
总部大楼已换微软Logo:回忆诺基亚的兴衰史
戴尔正告继续上市存风险 称黑石伊坎方案有缺乏