if($(document.body).height() < $(window).height()){
$(“#footer”).css({position:\’fixed\’,bottom:0,width:\’100%\’});
}
$(window).resize(function() {
if($(document.body).height() < $(window).height()){
$(“#footer”).css({position:\’fixed\’,bottom:0,width:\’100%\’});
}else{
$(“#footer”).css({position:\’relative\’});
}
});

版权声明:本文为hasayaki原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/hasayaki/p/3929788.html