$(document).ready(function(){
   var p=0,t=0;

   $(window).scroll(function(e){
      p = $(this).scrollTop();

      if(t<=p){//向下滚
         $('.nav').fadeOut(100);
      }else{//向上滚
         $('.nav').fadeIn(100);
      }
      setTimeout(function(){t = p;},0);
   });
});

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案