/*判断是否滑动到底部,是的话弹出footer*/ $(window).scroll(function(){ if($(window).scrollTop() == $(document).height() - $(window).height()){ $(".footer").css("display","block"); }else{ $(".footer").css("display","none"); } });