PJBLOG插图特殊效果之一
首先,把以下这段代码添加到header.asp末尾
<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>
然后在写日志的时候,凡需要实现以上这种效果的图片全部加上类似以下的代码:
<img onmouseover=nereidFade(this,100,10,5)
style="FILTER: alpha(opacity=55); "
onmouseout=nereidFade(this,50,10,5) src=http://www.weike365.cn/t/weike365.gif“ border="0" >
相关新闻>>
- 发表评论
-
- 最新评论 更多>>