Phonegap IOS - 当我尝试滚动主页时​​出现滚动条,即使html文件为空

Arj*_*Raj 8 ios cordova

我只是使用Terminal创建一个IOS Phonegap应用程序,然后在config.xml中更改UIWebViewBounce t = false,并删除body内的所有内容,并删除所有CSS数据.

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <link rel="stylesheet" type="text/css" href="css/index.css" />
    <title>Hello World</title>
   <script type="text/javascript" src="cordova-2.4.0.js"></script>
</head>
<body>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

这是我的HTML页面,我的index.css为空,我的Phonegap版本为2.4.然后我运行应用程序: 应用运行

当我尝试滚动空白页面时,会出现一个滚动条: 应用程序使用滚动条运行

为什么?谁能帮帮我吗?

**UPDATE已解决:只需从元标记中删除height = device-height或删除状态栏**

man*_*ukv 2

是的,这是由于设备状态栏造成的,我也遇到了这个问题,它几乎需要 20px 的窗口高度。最好确保您已选中 xcode Targets 中的“隐藏状态栏”选项。

在此输入图像描述