window.onload=function(){
    var aA=document.getElementsByTagName('a');
    for(var i=0; i<aA.length; i++){
        aA[i].onmouseover=function(){
            var This=this;
            clearInterval(This.time);
            This.time=setInterval(function(){
                    This.style.width=This.offsetWidth+8+"px";
                    if(This.offsetWidth>=160)
                    clearInterval(This.time);
                },30)
        }
        aA[i].onmouseout=function(){
                clearInterval(this.time);
                var This=this;
                this.time=setInterval(function(){
                    This.style.width=This.offsetWidth-8+"px";
                    if(This.offsetWidth<=120){
                        This.style.width='120px';
                        clearInterval(This.time);
                    }
                },30)
        }
    }
}

 

相关文章:

  • 2021-08-31
  • 2021-06-25
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-06-22
猜你喜欢
  • 2021-11-07
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案