鼠标移过图片变清晰效果

<IMG onmouseover=nereidFade(this,100,3,5) style="FILTER: alpha(opacity=55)" onmouseout=nereidFade(this,50,3,5) alt=懒人图库 src="http://www.makewing.com/lanren/jscode/js-0053/images/b-04.jpg" border=0>
<script language=JavaScript> 
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  //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>
阅读更多
上一篇Javascript - document对象详解
下一篇Ext.app.Application
想对作者说点什么? 我来说一句

鼠标移过翻牌效果

2018年01月11日 45KB 下载

默认图片模糊鼠标放上去变清晰

2014年08月26日 287KB 下载

没有更多推荐了,返回首页

关闭
关闭