原生键盘遮住页面部分内容

处理方法:

//1.设置父元素的高度,获取模块在设备中高度
mainHeight = $(".main").height();

//2.设置高度   之前是自适应

$(".main").css({"height":mainHeight,"overflow":"auto"});

//3.设置子元素高度,假设将高度向上调整50像素

$(".main").find("**").css({"height":mainHeight+50});

$("**").scrollTop(50);

  

原文地址:https://www.cnblogs.com/laoniaofly/p/6062300.html