是否可以在网站上隐藏 iOS 浏览器镶边并链接到外部网站?
是否可以建立一个在 iOS5 上隐藏浏览器 chrome 的网站,同时仍链接到外部网站?打开外部站点时不应显示浏览器镶边。
Is it possible to build a website that is hiding the browser chrome on iOS5 while still linking to external websites? The browser chrome should not be shown when the external site his opened.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
仅当网站添加到主屏幕并包含此元标记时,这才可能实现:
您无法从 Safari 应用程序本身隐藏镶边。
This is only possible when the website is added to the home screen and contains this meta tag:
You can't hide the chrome from the Safari app itself.
我发现这个有效,
$('body').delay('1000').animate({scrollTop: '0px' }, 'slow');
我注意到向下滚动将其删除,因此滚动了 60px(镶边的高度),但是隐藏了它并向下滚动了页面,但滚动了 0px,假设您的页面已从 # 目标上的顶部开始,愚弄了它!
我想你甚至可以消除延迟和动画,但我希望它是平滑的,而不是太生涩。
I found this works,
$('body').delay('1000').animate({ scrollTop: '0px' }, 'slow');
I noticed that scrolling down removed it, so scrolled 60px (height of the chrome), but that hide it and scrolled down the page, but a scroll of 0px, assuming your page has started at the top no on a # target, fools it!
I guess you could even remove the delay and animate, but I wanted it to be smooth, and not too jerky.