var windheight =window.innerHeight;
var tabbar = $(".weui-tabbar"); //底部导航
window.onresize = function(){
var docheight = window.innerHeight;
if(docheight < windheight){
tabbar.css("position","static");
}else{
tabbar.css("position","absolute");
}
}
原文:https://www.cnblogs.com/alexguoyihao/p/9473571.html