使用提示
可以将代码直接复制到需要的位置以确定显示位置。
方法是:在视图编缉状态下将鼠标移到所需位置 点击,然后切换到HTML编缉状态,将代码粘贴到光标所在位置。
本例需二组图片,可用PHOTOSHOP的去色功能将第一组图片去色。
非常漂亮的图像效果
演示效果:将鼠标移到上面的图像看看效果
代码提示:将下面的代码复制到〈BODY〉区
<script language=JavaScript> <!-- Beginning of JavaScript Code ------------------- 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); } } // -- End of JavaScript Code --> </script> //修改下面的图像地址和大小 <TABLE align=center border=0 cellPadding=0 cellSpacing=1> <TBODY> <TR align=middle> <TD background=files/index_dreamweaver2.gif height=60 width=60><A href="http://www.hooji.com/java/display.asp?id=542#"><IMG alt="Dreamweaver 资源" border=0 height=60 onmouseout=nereidFade(this,01,7,5) onmouseover=nereidFade(this,100,5,7) src="files/index_dreamweaver.gif" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FILTER: alpha(opacity=0)" width=60></A></TD> <TD background=files/index_fireworks2.gif height=60 width=60><A href="http://www.hooji.com/java/display.asp?id=542#"><IMG alt="Fireworks 资源" border=0 height=60 onmouseout=nereidFade(this,01,7,5) onmouseover=nereidFade(this,100,5,7) src="files/index_fireworks.gif" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FILTER: alpha(opacity=0)" width=60></A></TD> <TD background=files/index_flash2.gif height=60 width=60><A href="http://www.hooji.com/java/display.asp?id=542#p"><IMG alt="Flash 资源" border=0 height=60 onmouseout=nereidFade(this,01,7,5) onmouseover=nereidFade(this,100,5,7) src="files/index_flash.gif" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FILTER: alpha(opacity=0)" width=60></A></TD> <TD background=files/index_photoshop2.gif height=60 width=60><A href="http://www.hooji.com/java/display.asp?id=542#"><IMG alt="Photoshop 资源" border=0 height=60 onmouseout=nereidFade(this,01,7,5) onmouseover=nereidFade(this,100,5,7) src="files/index_photoshop.gif" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FILTER: alpha(opacity=0)" width=60></A></TD> </TR></TBODY></TABLE>
使用提示
返回目录