组合透明度变换的时候,单个第一次变换时候速度很快后面又正常怎么回事
//这是JS代码部分 <script type="text/javascript"> window.onload=function(){ var i=document.getElementsByTagName("li"); for(var j=0;j<i.length;j++) { i[j].time=null; i[j].alpha=30; i[j].onmouseover=function(){ Move(this,100); }; i[j].onmouseout=function(){ Move(this,30); }; } } function Move(obj,setAlpha){ clearInterval(obj.time); var speed=0; obj.time=setInterval(function(){ if(obj.alpha==setAlpha) {clearInterval(obj.time)} if(obj.alpha>setAlpha) {speed=-10;} else {speed=10;} obj.alpha+=speed; obj.style.filter="alpha(opacity:"+obj.alpha+")"; obj.style.opacity=obj.alpha/100; },30) } </script>
//希望能帮忙看看哪里有问题T-T