鼠标移动到版块图标产生的渐变效果

1.inc\main.js末尾增加如下代码:

//渐隐渐现函数
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);
}
}
2.index模板html(7):

function showboard

.......

if (indexIMG!='')
{
str = str.replace(/{\$indexIMG}/gi,'<table align="left"><tr><td><a href="list.asp?boardid='+BoardID+'"> <img src='+indexIMG+' align="top" border="0" style="FILTER: alpha(opacity=40)" onMouseOut=nereidFade(this,40,10,10) onMouseOver=nereidFade(this,100,0,10) ></a></td><td width="20"></td></tr></table>');
}
else
{
str = str.replace(/{\$indexIMG}/gi,'');
}

......

增加以上红色部分

你可能感兴趣的:(html,asp)