日期:2014-05-16  浏览次数:20364 次

55555555,,,,救命啊. . . ..
<style   type= "text/css ">
td{
width:100%;
background:red;
cursor:hand;
filter:   Alpha(opacity=-1);

event:expression(
onmouseover   =   function()
                    {
PublicID   =   this;
fncOver();
                    },
                     
onmouseout   =   function()
                    {
PublicID   =   this;
fncOut();
                    }
                )
}
</style>  

<script   language=javascript>  
var   cnt   =   1;
window.$_timer1   =   null;
window.$_timer2   =   null;
var   PublicID   =   null;

function   fncOver(){
window.clearTimeout($_timer2);
  if   (++cnt> =50)   {
  window.clearTimeout($_timer1);
  return;
  }
  PublicID.style.filter= "alpha(opacity= "   +cnt+ ") ";
  $_timer1   =   window.setTimeout(fncOver,   1);
}
function   fncOut(){
window.clearTimeout($_timer1);
  if   (--cnt <0)   {
  window.clearTimeout($_timer2);
  return;
  }
  PublicID.style.filter= "alpha(opacity= "   +cnt+ ") ";
  $_timer2   =   window.setTimeout(fncOut,   1);
}
</script>

<table   border=1   cellpadding=0   cellspacing=0>
<tr> <td> 1111111111111111111111 </td> </tr>
<tr> <td> 1111111111111111111111 </td> </tr>
<tr> <td> 1111111111111111111111 </td> </tr>
<tr> <td> 1111111111111111111111 </td> </tr>
<tr> <td> 1111111111111111111111 </td> </tr>
<tr> <td> 1111111111111111111111 </td> </tr>
</table>

------解决方案--------------------
看一下。
------解决方案--------------------
我写的导航条渐变效果:
var setOpa,ArrOpa=new Array();
function setMenu(s){
if(setOpa)clearTimeout(setOpa);
var n,d=document.getElementById( "top_menu2 ").getElementsByTagName( "DIV ");
for(var i=0;i <d.length;i++){
if(!ArrOpa[i])ArrOpa[i]=0;
if(i!=s){
if(ArrOpa[i]> 0){
ArrOpa[i]-=3;
d[i].style.filter= "alpha(opacity= "+ArrOpa[i]+ ") ";
n=true;
}else{
if(d[i].style.display!= "none ")d[i].style.display= "none ";
}
}
}
if(n){
setOpa=setTimeout( "setMenu( "+s+ ") ",5);
}else if(s!=-1){
if(ArrOpa[s] <100){
ArrOpa[s]+=2;
d[s].style.filter= "alpha(opacity= "+ArrOpa[s]+ ") "
if(d[s].style.display!= "block ")d[s].style.display= "block ";
setOpa=setTimeout( "setMenu( "+s+ ") ",5);
}
}
}