在我的jQuery Mobile项目中,我使用以下代码:
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
我正在使用Safari浏览器的地址栏和导航页脚。如何隐藏这些内容,以便可以显示我的应用程序?
最佳答案
您可以设置一些元标记来告诉iOS您可以将网站作为网络应用添加到主屏幕。从那里启动后,所有Safari元素都会被隐藏。
请查看标题为“隐藏Safari用户界面组件” here的部分。
您可以为应用指定在主屏幕上显示的启动初始屏幕图像和自定义图标。
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-114x114.png" />
<link rel="apple-touch-startup-image" href="apple-touch-startup-image-320x460.png" />
<link rel="apple-touch-startup-image" sizes="768x1004" href="apple-touch-startup-image-768x1004.png" />
关于jquery-mobile - 隐藏Safari地址栏和页脚,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5767565/