淡进淡出的图片效果

原创 2004年07月06日 10:18:00

<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);
    }
}

// Flash Image Extension for Dreamwever ,by Yichun Yuan(dezone@sina.com)
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);
    }
}

function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}
function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}


//-->
</SCRIPT><table width="300" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="7285CF">
        <tr bgcolor="#FFFFFF" align="center">
          <td><a href="/dreamweaver/index.asp"><img src="images/userface/image56.gif" width="60" height="60" border="0" alt="Dreamweaver 资源 "onmouseout="nereidFade(this,60,10,5)" onmouseover="nereidFade(this,100,10,5)" style="FILTER: alpha(opacity=50)"></a></td>
          <td><a href="/fireworks/index.asp"><img src="images/userface/image55.gif" width="60" height="60" border="0" alt="Fireworks 资源" onmouseout="nereidFade(this,60,10,5)" onmouseover="nereidFade(this,100,10,5)" style="FILTER: alpha(opacity=50)"></a></td>
          <td><a href="/flash/index.asp"><img src="images/userface/image53.gif" width="60" height="60" border="0" alt="Flash 资源" onmouseout="nereidFade(this,60,10,5)" onmouseover="nereidFade(this,100,10,5)" style="FILTER: alpha(opacity=50)"></a></td>
          <td><a href="/photoshop/index.asp"><img src="images/userface/image54.gif" width="60" height="60" border="0" alt="Photoshop 资源" onmouseout="nereidFade(this,60,10,5)" onmouseover="nereidFade(this,100,10,5)" style="FILTER: alpha(opacity=50)"></a></td>
        </tr>
      </table>
   

显示图片渐隐效果

图片渐隐效果(IE中有效):1.Script代码:nereidFadeObjects = new Object();nereidFadeTimers = new Object();function n...
  • liaoxitao
  • liaoxitao
  • 2005-12-29 23:12:00
  • 700

图片淡入淡出切换效果

应网友要求,做一个图片淡入淡出切换的效果功能。需要的是后台动态加载图片。在演示之前,Insus.NET准备好几张图片放在网点的一个目录(Imgfiles)下; Jquery script和css 样式...
  • dyllove98
  • dyllove98
  • 2013-06-26 21:54:23
  • 2128

jQuery效果之淡入淡出

.fadeOut([duration][,complete])——目标元素淡出隐藏; .fadeIn([duration][,complete])——目标元素淡入显示; .fadeToggle...
  • bboyjoe
  • bboyjoe
  • 2015-08-09 23:37:34
  • 1017

鼠标移过图片变清晰效果

nereidFadeObjects = new Object(); nereidFadeTimers = new Object(); function nereidFade(object, des...
  • azhou2012
  • azhou2012
  • 2012-03-26 23:51:59
  • 259

Cocos2d-x 3.3 的3D开发功能介绍

主要有以下功能: 1. 基本的Sprite3D使用,加载静态模型和动态模型,看 Sprite3DBasicTest 2.Sprite3D对象的旋转,缩放等Action操作 3.Sprite3D中使用S...
  • sdhjob
  • sdhjob
  • 2014-09-26 12:12:12
  • 13743

Android资源之图像资源(淡入淡出、嵌入)

今天把图像资源剩余的几个知识梳理一下。淡入淡出资源同图像状态和图像级别资源一样可以切换两个图像(目前只支持两个图像的切换),并且使这两个图像以淡入淡出效果进行切换。如上一篇博文介绍的开关电灯一样,如果...
  • gc_gongchao
  • gc_gongchao
  • 2014-06-22 20:23:38
  • 3263

cocos2d-x 场景淡出淡入效果的具体运用

if(((PmdInAllLayer*)this->getParent())->getPosition().x==-((this->_allMap->getTileSize().width*this-...
  • u010296979
  • u010296979
  • 2014-03-07 17:46:52
  • 1682

vb程序 图片浏览特效

  • 2009年02月21日 11:06
  • 30KB
  • 下载

网站banner淡进淡出切换效果

  • 2018年01月16日 15:09
  • 2KB
  • 下载

jquery图片轮播插件仿支付宝2013版全屏图片幻灯片淡出淡进切换效果

  • 2016年12月11日 09:23
  • 712KB
  • 下载
收藏助手
不良信息举报
您举报文章:淡进淡出的图片效果
举报原因:
原因补充:

(最多只允许输入30个字)