setInterval(function (){
          //用距离顶的高度 + (滚动的高度+100 - 距离顶的高度)乘0.1
        me.style.top = parseInt(me.style.top) + (Math.max(document.body.scrollTop, document.documentElement.scrollTop) +
         _top - parseInt(me.style.top)) * 0.1 + 'px'; }, 10 + parseInt(Math.random()*20) );
         //如果将这里的参数设置为10 + parseInt(Math.random()*20) 联系条滚动的就不会那么生硬。而是很平缓。
        return arguments.callee;  //这里是实现匿名函数的递归调用
      };

相关文章:

  • 2022-12-23
  • 2021-08-08
  • 2021-12-09
  • 2021-06-08
  • 2022-02-17
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-06-14
  • 2021-09-26
  • 2021-04-08
  • 2021-11-14
  • 2022-12-23
  • 2022-01-17
相关资源
相似解决方案