JavaScript延时效果比较不错的
时间:2024-04-22 13:22:48
<script language="javascript" type="text/javascript"> nereidFadeObjects = new Object(); nereidFadeTimers = new Object(); function nereidFade(object, destOp, rate, delta){ if (!document.all) return if (object != "[object]"){ setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0); return; } clearTimeout(nereidFadeTimers[object.sourceIndex]); diff = destOp-object.filters.alpha.opacity; direction = 1; if (object.filters.alpha.opacity > destOp){ direction = -1; } delta=Math.min(direction*diff,delta); object.filters.alpha.opacity+=direction*delta; if (object.filters.alpha.opacity != destOp){ nereidFadeObjects[object.sourceIndex]=object; nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate); } } </script> <style type="text/css"> </style> <div style="margin-top:20px;" align="center"> <ul id="menu"> <li style="background-image:url(/pic/ma_1.gif)"><img src='/pic/Mb_1.gif' alt="工作室 | Studio" border='0' style='FILTER: alpha(opacity=0)' onmouseover=nereidFade(this,100,10,7) onmouseout=nereidFade(this,01,70,5)></li><li style="background-image:url(/pic/ma_2.gif)"><img src='/pic/Mb_2.gif' alt="油画 | Canvas" border='0' style='FILTER: alpha(opacity=0)' onmouseover=nereidFade(this,100,10,7) onmouseout=nereidFade(this,01,70,5)></li><li style="background-image:url(/pic/ma_3.gif)"><img src='/pic/Mb_3.gif' alt="唐装 | Tangsuit" border='0' style='FILTER: alpha(opacity=0)' onmouseover=nereidFade(this,100,10,7) onmouseout=nereidFade(this,01,70,5)></li><li style="background-image:url(/pic/ma_4.gif)"><img src='/pic/Mb_4.gif' alt="美玉 | Jade" border='0' style='FILTER: alpha(opacity=0)' onmouseover=nereidFade(this,100,10,7) onmouseout=nereidFade(this,01,70,5)></li><li style="background-image:url(/pic/ma_5.gif)"><img src='/pic/Mb_5.gif' alt="导航 | Gps" border='0' style='FILTER: alpha(opacity=0)' onmouseover=nereidFade(this,100,10,7) onmouseout=nereidFade(this,01,70,5)></li></ul> </div>
标签:JavaScript延时效果比较不错的
0
投稿
猜你喜欢
Python抽象基类的定义与使用方法
2021-07-31 21:48:43
Golang汇编之控制流深入分析讲解
2024-05-08 10:15:11
python广度搜索解决八数码难题
2023-01-26 18:12:43
windows上安装python3教程以及环境变量配置详解
2023-11-11 08:09:35
python人工智能tensorflow函数tf.get_collection使用方法
2023-08-09 14:27:54
python3爬虫之设计签名小程序
2021-09-16 00:26:46
Python编程基础之字典
2021-10-02 13:34:56
sublime text 3配置使用python操作方法
2023-01-21 20:30:14
MySQL中创建表的三种方法汇总
2024-01-21 09:40:35
用ASP和SQL实现基于Web日历源码
2010-04-24 15:52:00
ASP中ServerVariables集合用法详解
2007-09-14 10:26:00
详解python函数传参是传值还是传引用
2023-11-13 13:25:58
MySQL的慢日志线上问题及优化方案
2024-01-19 12:15:24
Python3读取和写入excel表格数据的示例代码
2022-01-21 10:33:55
Python字符串三种格式化输出
2022-12-15 09:47:59
利用pyinstaller或virtualenv将python程序打包详解
2022-08-01 10:37:52
Pycharm激活方法及详细教程(详细且实用)
2023-04-12 05:19:30
python使用matplotlib模块绘制多条折线图、散点图
2021-07-28 06:41:20
Python做文本按行去重的实现方法
2021-12-31 17:41:07
python正则表达式中匹配次数与贪心问题详解(+ ?*)
2021-04-24 20:52:04