Cordova ipad 应用 100% 高度问题

Cordova ipad app 100% height issue

我刚刚通过 cordova 制作了一个 ios 应用程序,iphone 应用程序看起来不错,因为我一直在 iphones 使用肖像模式,但 ipads 我是始终使用锁定旋转的横向模式。问题是当我构建一个应用程序并 运行 它在我的 ipad 上时景观工作正常旋转被锁定但主要问题是我在 body 上设置了 100% 高度,不知何故,它在 iPad 景观上不起作用。看起来 100% 没有检测到横向模式,并且自动将高度设置为 1024px,因为如果我在 inspect 中为 body 设置 768px 高度,那么整个应用程序看起来应该很好。

有什么想法吗?

如果设置比例则不要设置宽度和高度

来自apple doc

You do not need to set every viewport property. If only a subset of the properties are set, then Safari on iOS infers the other values. For example, if you set the scale to 1.0, Safari assumes the width is device-width in portrait and device-height in landscape orientation.