爱易网
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 浏览次数:20255 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>爱易网网页特效演示,爬向鼠标的好多蚂蚁</title> </head> <body> <style type="text/css"> .ant { height: 16px; position: absolute; visibility: hidden; width: 16px; } </style> <SCRIPT LANGUAGE="JavaScript"> var dir = "images/"; var images = new Array( dir+"antdl.gif", dir+"antdn.gif", dir+"antdr.gif", dir+"antlt.gif", dir+"antrt.gif", dir+"antul.gif", dir+"antup.gif", dir+"antur.gif" ); var isMinNS4 = (document.layers) ? 1 : 0; var isMinIE4 = (document.all) ? 1 : 0; var _LBimgList; var _LBimgCount; var _LBbase = "LBbase"; var _LBlow = "LBlow"; var _LBhigh = "LBhigh"; var _LBwidth; var _LBheight; var _LBbaseLayer; var _LBlowLayer; var _LBhighLayer; function createLoadBar(width, height, bdSize, bdColor, bgColor, fgColor, fontFace, fontSize, text) { var txtLow, txtHigh, tblStart, tblEnd; var str; txtLow = '<font color="' + fgColor + '" face="' + fontFace + '" size=' + fontSize + '>' + text + '</font>'; txtHigh = '<font color="' + bgColor + '" face="' + fontFace + '" size=' + fontSize + '>' + text + '</font>'; tblStart = '<table border=0 cellpadding=0 cellspacing=0 height=100% width=100%><tr valign="center"><td align="center">'; tblEnd = '</td></tr></table>'; if (isMinNS4) str = '<layer name="' + _LBbase + '" bgcolor="' + bdColor + '" width=' + width + ' height=' + height + ' visibility="hide">\n' + ' <layer name="' + _LBlow + '" bgcolor="' + bgColor + '" left=' + bdSize + ' top=' + bdSize + ' width=' + (width - 2 * bdSize) + ' height=' + (height - 2 * bdSize) + '>' + tblStart + txtLow + tblEnd + '</layer>\n' + ' <layer name="' + _LBhigh + '" bgcolor="' + fgColor + '" left=' + bdSize + ' top=' + bdSize + ' width=' + (width - 2 * bdSize) + ' height=' + (height - 2 * bdSize) + '>' + tblStart + txtHigh + tblEnd + '</layer>\n' + '</layer>'; if (isMinIE4) str = '<div id="' + _LBbase + '" style="position:absolute; background-color:' + bdColor + '; width:' + width + 'px; height:' + height + 'px; visibility:hidden;">\n' + ' <div id="' + _LBlow + '" style="position:absolute; background-color=' + bgColor + '; left:' + bdSize + 'px; top:' + bdSize + 'px; width:' + (width - 2 * bdSize) + 'px; height:' + (height - 2 * bdSize) + 'px;">' + tblStart + txtLow + tblEnd + '</div>\n' + ' <div id="' + _LBhigh + '" style="position:absolute; background-color=' + fgColor + '; left:' + bdSize + 'px; top:' + bdSize + 'px; width:' + (width - 2 * bdSize) + 'px; height:' + (height - 2 * bdSize) + 'px;">' + tblStart + txtHigh + tblEnd + '</div>\n' + '</div>'; document.writeln(str); _LBwidth = width - 2 * bdSize; _LBheight = height - 2 * bdSize; } function startLoadBar(srcList, x, y) { var i, w, h; if (isMinNS4) { _LBbaseLayer = document.layers[_LBbase]; _LBlowLayer = _LBbaseLayer.document.layers[_LBlow]; _LBhighLayer = _LBbaseLayer.document.layers[_LBhigh]; } if (isMinIE4) { _LBbaseLayer = eval('document.all.' + _LBbase); _LBlowLayer = eval('document.all.' + _LBlow); _LBhighLayer = eval('document.all.' + _LBhigh); } if (isMinNS4) { w = window.innerWidth; h = window.innerHeight; } if (isMinIE4) { w = document.body.clientWidth; h = document.body.clientHeight; } if (x == null) x = Math.round((w - _LBwidth) / 2); if (y == null) y = Math.round((h - _LBheight) / 2); moveLayerTo(_LBbaseLayer, x, y); clipLayer(_LBhighLayer, 0, 0, 0, _LBheight); showLayer(_LBbaseLayer); _LBimgCount = 0; _LBimgList = new Array(); for (i = 0; i < srcList.length; i++) { _LBimgList[i] = new Image(); _LBimgList[i].onabort = _LBupdate;
上一篇:狡猾的按钮特效
下一篇:跟随鼠标的棉花糖
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
微信企业号必须搬走四座大山,否则只能铩羽而归!
联想架构调整后:Think品牌或推智能手机
支付宝服务窗后台首曝光 开放用户消费数据
苹果App Store被大量刷榜:iTunes账号成帮凶
网友爆料称微软雇水军宣传主机Xbox One
火一把就死: 百度魔图验证社交游戏衰亡宿命
2018双11阿里云老用户怎么参加拼团活动 老用户拼团方法
聚美优品获基石投资1.5亿美金,IPO吃下定心丸
魅族黄章惹怒芙蓉姐姐 将跨界推女神手机
推荐阅读
更多>
可靠消息称微型针孔偷拍设备拟全面禁止
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱
如家撤离同程内情:祸起反水OTA“联盟”?
唯品会荣登“最贵中概股”的欢喜与哀愁
网络音乐非片面收费 高晓松时间表难完成
快递企业征收“份子钱” 成全了谁 苦了谁?
巧用百度推行系统 突显竞价效果
微软很“捉急”:补贴Win8 重加末尾按钮
百视通:Xbox One汉化获批 游戏迷欢呼吧
微博启动自媒体计划 粉丝+收入双激励是亮点
玩游戏式的趣味戒烟App:Kwit
“宽带中国”计划已正式上升为国家战略
电信业营改增今起实施 运营商短期利润骤降
柳传志马云陷舆论漩涡:请不要辜负这个时代
苏宁易购成世界最慢电商 专家称其涉嫌违约
高通反垄断案下月有望落定
新一代iPhone11月底国内上市 支持TD制式
HDS发布《2013中国CIO洞察白皮书》
腾讯再次重申:普通微信誉户相对不收费
云储存有多远:跨过数据安全问题即可到达