左边在线客服的小技巧
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;  //这里是实现匿名函数的递归调用
      };
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号