问答详情
源自:7-1 JS动画案例

为什么变化速度特别慢,而且没有直接下降到代码要求处,还是从上面下来,不是从下面升上去

var divMove = document.getElementById('move');
   var divList = divMove.getElementsByTagName('div');
   for(var i =0;i<divList.length;i++){
    divList[i].onmouseover = function(){
     var _this = this.getElementsByTagName('a')[0];
     startMove(_this,{top:-20,opacity:100},function(){
      _this.style.top=50+'px';
      _this.style.top=50+'px';
      startMove(_this,{top:0,opacity:100});
     });
    }
   }

提问者:Hiccup 2018-11-27 13:27

个回答

  • 苏扬帆
    2018-12-30 15:02:34

    你这是的top跨度太大了 所以会显示速度慢