150、图片重叠带阴影

150、图片重叠带阴影

脚本说明:

把如下代码加入<body>区域中

<script>

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>

<TABLE background="background.jpg">

<TR><TD>

<DIV>

<img src="B2iconcrop.gif" style="filter:alpha(opacity=10)" onmouseover="nereidFade(this,100,30,5)" onmouseout="nereidFade(this,10,50,5)">

<img src="B2iconcrop.gif" style="filter:alpha(opacity=10)" onmouseover="nereidFade(this,100,30,5)" onmouseout="nereidFade(this,10,50,5)">

<img src="B2iconcrop.gif" style="filter:alpha(opacity=10)" onmouseover="nereidFade(this,100,30,5)" onmouseout="nereidFade(this,10,50,5)">

</DIV>

</TR></TD>

</TABLE>

Write a comment

Comments: 0