[英]IOS7 minimal ui not working
I want to hide url bar on IOS 7, so when I put <meta name="viewport" content="minimal-ui">
, it don't hide url bar, its still on the page and my website is not loaded responsive , its opened like its desktop version, does anyone knows why is this happening and how to do this properly? 我想在IOS 7上隐藏网址栏,所以当我放入
<meta name="viewport" content="minimal-ui">
,它不会隐藏网址栏,它仍在页面上并且我的网站未加载响应,其打开方式类似于桌面版本,有人知道为什么会这样以及如何正确执行吗?
I even tried 我什至试过
window.addEventListener("load",function() {
// Set a timeout...
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);
});
I read this article and it looks like its not possible on new IOS. 我读了这篇文章,看来它在新的IOS上是不可能的。 Link
链接
Note that (as of now) minimal-ui only works on iPhone, not iPad. 请注意,(截至目前)minimum-ui仅适用于iPhone,不适用于iPad。
Make sure your meta tag is hard coded on the page (or rendered server side). 确保您的元标记在页面(或呈现的服务器端)上进行了硬编码。
Try adding a fuller list of attributes. 尝试添加完整的属性列表。 I have the following and it's working across iPhone 4 and 5 with iOS 7.1
我有以下内容,并且可以在带有iOS 7.1的iPhone 4和5上使用
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, minimal-ui">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.