对于混合应用程序,我需要构建应用程序的 Web 部分。
我定义了 html 和 body 是 100% 的视口。我认为这是个好主意,但事实证明,当显示触摸键盘时,Android 会更改视口。因此它会调整页面上所有元素的大小。这不是我想要的行为。
是否可以根据设备高度在元素上定位和给出尺寸,而不受触摸键盘的干扰?
问题在这里显示http://betapreview.nl/playground/overflow-table/index2.html
我所做的已经尝试过
选项1
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0; maximum-scale=1.0; user-scalable=no">
示例:http ://betapreview.nl/playground/overflow-table/index2.html
选项 2
var theHeight = $(document).height();
$("#wrapper").css("height", theHeight);
示例:http ://betapreview.nl/playground/overflow-table/index3.html