爱易网
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 浏览次数:20135 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
<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;
上一篇:鼠标感应图像大小
下一篇:跟随鼠标的棉花糖
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
评论:马云的成功建立在什么基础上很值得怀疑
阿里巴巴上市后雅虎将面临更大的业绩压力
Android版WhatsApp曝漏洞:聊天记录可被窃取
京东很忙:升服务推产品更新招股书 能赶在阿里前上市?
聚美优品获基石投资1.5亿美金,IPO吃下定心丸
奇虎360证明了“惟平台化才能生存”是谬论,中国互联网不能少了周鸿祎
电信运营商员工涌入虚拟运营商,待遇差距多大?
迅雷向美SEC提交IPO招股书:拟最多筹资1亿美元
360涉足搜索范围 百度市场份额面临应战
推荐阅读
更多>
阿里巴巴IPO难掩的四个现实问题:天猫销售额成谜、淘宝拖后腿、营收迅猛其他不行和投资者未必买账
黑莓高管:黑莓能作为家“小众公司”活下来
诺基亚称不会更名“微软移动” 5月还将发布新品
国美痛批网购七宗罪 用短暂盈利输了未来
高通拼抢国际芯片市场 联发科海外拓展难安心
苹果20年以来首次发债 融资170亿美元
探析APP移动营销发扬实效的微妙
新浪微博推粉丝头条功能 意欲与大号分成
iPhone 6 Plus要召回是谣言
途牛开盘价9美元 与发行价持平
联想国庆完成收购IBM x86服务器
诺基亚依托规模效应 猛攻国际市场空白
Android版WhatsApp曝漏洞:聊天记录可被窃取
搜狐与奇虎360或结盟对抗BAT
赴美开店,阿里11Main准备好了吗?
评论:马云的成功建立在什么基础上很值得怀疑
英特尔涉嫌垄断 欧盟或开出史上最高罚单
墨迹也要做硬件,工具类应用如何“变异”的
中移动本月推手机钱包 iPhone遭边缘化
iPhone 6将于10月17日内地上市:售5288元起