隐藏地址栏而不隐藏iOS 6上的智能应用横幅 [英] Hiding address bar without hiding the smart app banner on iOS 6

查看:194
本文介绍了隐藏地址栏而不隐藏iOS 6上的智能应用横幅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用标准的scrollTo技术隐藏iOS上的地址栏(类似于)。我还使用 iOS 6智能应用横幅,但是当使用上述技术隐藏地址栏时,智能应用横幅也会被屏幕顶部的地址栏隐藏起来。

I'm currently hiding the address bar on iOS using the standard scrollTo technique (something like this). I am also using an iOS 6 smart app banner, but when using the above technique to hide the address bar the smart app banner is also hidden up by the address bar off the top of the screen.

有什么方法可以隐藏地址栏但不隐藏智能横幅?

Is there any way to hide the address bar but not the smart banner?

推荐答案

长话短说,聪明的人在 HTML5 Boilerplate 已经解决了他们的移动版

Long story short, the clever folks at HTML5 Boilerplate have already solved the problem in their mobile version.

MBP.hideUrlBarOnLoad /h5bp/mobile-boilerplate/blob/master/js/helper.jsrel =nofollow> helper.js ,隐藏地址栏并且不隐藏智能应用横幅。似乎关键区别可能是 MBP.getScrollTop ,它比单纯滚动到1更加智能滚动点。

Check out MBP.hideUrlBarOnLoad in helper.js, which hides the address bar and doesn't hide the smart app banner. It appears that the key difference is probably MBP.getScrollTop, which gets a more intelligent scrolling point than simply scrolling to 1.

这篇关于隐藏地址栏而不隐藏iOS 6上的智能应用横幅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆