如果是footer被顶起,用js判断
var oHeight = $(document).height(); $(window).resize(function(){ //ios软键盘弹出不会触发resize事件 if($(document).height() < oHeight){ $("#footer").css("position","static"); }else{ $("#footer").css("position","absolute"); //adsolute或fixed,看你布局 } });