iOS:当键盘出现时调整屏幕大小(在HTML5应用程序中)

3
我在iOS中有一个使用Phonegap 4.0的应用程序,其中包含一个标签。
当我聚焦到标签时,整个屏幕会上移,但不会重新调整大小。但我希望屏幕的大小能够根据键盘弹出时变得更小而调整。
目标是保持标题栏可见。
<header style="position:absolute; top:0: left:0; right:0; height: 30px;">
  ...
</header>

我的当前index.html中的viewport标签:

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0">

这没有任何影响:

<preference name="KeyboardShrinksView" value="false" />

即使在视口标签中添加 height=device-height 也不起作用。

1
嗨,你找到任何答案了吗? - Patrick Ferreira
1个回答

0
将“minimum-scale = 1.0”更改为“maximum-scale = 1.0”。使用minimum-scale意味着内容不能调整到比键盘还要小的尺寸。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接