javascript - Skrollr 不会隐藏 iOS 或 Android 浏览器中的工具栏

标签 javascript android ios skrollr

我使用 skrollr 在网站中实现多个目标(类似视差的背景、更改元素不透明度等),并且它在桌面和移动设备上都运行良好。

我注意到的唯一问题是移动操作系统浏览器不再隐藏工具栏。一旦我禁用 skrollr,一切都很好 - 工具栏在我开始滚动页面后立即消失。当 skrollr 使用时,工具栏始终保持可见。

有没有办法在使用 skrollr 的同时仍保持常规浏览器行为?

如果有任何其他信息可以帮助您理解该问题,请告诉我。

谢谢

最佳答案

我们无法以编程方式隐藏/显示地址栏。甚至不可能只是隐藏它(iOS 7 使这完全不可能,而 7.1 会添加一些元标记来完全隐藏它),更不用说再次显示它了。

https://gist.github.com/scottjehl/1183357

The old hack of using window.scrollTo to hide the URL bar doesn’t work anymore; therefore there is no way to hide the URL bar or toolbar without user’s intervention scrolling the page.

If you are not using a natural scroll, you will have problems (detailed below).

http://www.mobilexweb.com/blog/safari-ios7-html5-problems-apis-review

A property, minimal-ui, has been added for the viewport meta tag key that allows minimizing the top and bottom bars on the iPhone as the page loads. While on a page using minimal-ui, tapping the top bar brings the bars back. Tapping back in the content dismisses them again.

For example, use <meta name="viewport" content="width=1024, minimal-ui">.

https://forums.whirlpool.net.au/archive/2194915

关于javascript - Skrollr 不会隐藏 iOS 或 Android 浏览器中的工具栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21181242/

相关文章:

javascript - 将代码迁移到 html 和 javascript 后如何引用包

javascript - 在 Android 上调试 javascript 时如何设置断点(并查看错误行号)?

javascript - for循环内的for循环似乎无法弄清楚

ios - 在 Swift 中解析 CSV 文件并将其加载到 Core Data 中

ios - 重写不在 super 中的方法

javascript - JavaScript 中的 main() 函数?

返回空 GraphUser 的 Android Facebook SDK v3.0 SSO LoginButton

android - 收到推送通知时打开 Android 应用程序

下载文件时出现 java.lang.OutOfMemoryError

ios - 通过 Donebutton 关闭 UIPickerView