私人领地

效果收集-滚到一定程度再漂浮

适用产品详情 导航漂浮

 window.onscroll = function(){ 
      var t = document.documentElement.scrollTop || document.body.scrollTop;  
      var Div = document.getElementById( "fix_goods" ); 
      if( t <= 755 ) { 
          Div.style.position = "";
          Div.style.top = "";
      } else { 
          //Div.style.display = "none";
          Div.style.position = "fixed";
          Div.style.top = "-10px";
      
      } 
  } 

 

posted @ 2015-09-19 18:01  狂奔的蜗牛Snails  阅读(130)  评论(0编辑  收藏  举报