大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 网页设计 -> HTML/CSS -> 鼠标实现图片的渐有渐无

鼠标实现图片的渐有渐无

时间: 2021-07-31 作者:daque

1,css,js,img一个都不许少运转代码框<style type="text/css"><!--.trans_img {filter:alpha(opacity=30,enabled=1) blendtrans(duration=1); border:0 solid black}--></style><script language=javascript> function transimg(obj,enable) { obj.filters.blendtrans.apply(); obj.filters[0].enabled=enable; obj.filters.blendtrans.play(); }</script><img src="http://www.fixdown.comhttp://www.fixdown.com/article/uploadpic/2006-1/200618112344826.gif" class="trans_img" onmouseover="transimg(this,0)" onmouseout="transimg(this,1)"> [ctrl+a 十足采用 提醒:你可先窜改局部代码,再按运转]2,js & img运转代码框<script language="javascript"> nereidfadeobjects = new object();nereidfadetimers = new object();function nereidfade(object, destop, rate, delta){if (!document.all)return if (object != "[object]"){ file://do this so i can take a string too 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><a href="http://www.cnbruce.com/" target="_blank"><img border="0" src=http://www.fixdown.comhttp://www.fixdown.com/article/uploadpic/2006-1/200618112344826.gif onmouseout=nereidfade(this,50,10,5) onmouseover=nereidfade(this,100,10,5) style="filter: alpha(opacity=50) " border=0></a> [ctrl+a 十足采用 提醒:你可先窜改局部代码,再按运转]3,用htc文献,不必js进而减少处事量。载入alpha.htc: http://www.cnbruce.com/js/alpha.htc 功效页察看:http://www.cnbruce.com/js/a.html  4,有点flash的滋味,一闪而过。运转代码框<script language=javascript type=text/javascript>function trains(id,text){document.all[id].innerhtml=' '+text}function trainpic(id,text){document.all[id].innerhtml='<img src="'+text+'.gif">'}function high(which2){theobject=which2;theobject.filters.alpha.opacity=0highlighting=setinterval("highlightit(theobject)",50)}function low(which2){clearinterval(highlighting)which2.filters.alpha.opacity=100}function highlightit(cur2){if (cur2.filters.alpha.opacity<100)cur2.filters.alpha.opacity+=15else if(window.highting)clearinterval(highlighting)}</script><a href="http://www.cnbruce.com/"><img onmouseover="this.style.filter='alpha(opacity=100)';high(this)" onmouseout="low(this)" src="http://www.fixdown.comhttp://www.fixdown.com/article/uploadpic/2006-1/200618112344826.gif" border="0"></a> [ctrl+a 十足采用 提醒:你可先窜改局部代码,再按运转]5,再有图片的“口角转彩色”运转代码框<script>function dotrans(filtercode) {imgobj.filters[0].apply();oimg.style.filter = filtercodeimgobj.filters[0].play();}</script><span id=imgobj onmouseleave='dotrans("gray")' style="filter: progid:dximagetransform.microsoft.fade(overlap=1.00); width: 1px" onmouseenter='dotrans("")'><img id=oimg style="filter: gray" src="http://www.fixdown.comhttp://www.fixdown.com/article/uploadpic/2006-1/200618112344826.gif"> </span> [ctrl+a 十足采用 提醒:你可先窜改局部代码,再按运转] (根源:蓝色理念)

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.