如何在全屏模式下获取 iPhone 或 iPad 浏览器/固件版本

发布于 2024-12-12 13:47:53 字数 713 浏览 1 评论 0原文

我需要知道是否 -webkit-overflow-scrolling: touch; Overflow:scroll; 可用于我的 web 应用程序,否则我可以通过 iScroll 获得该功能。

我正在检查 mootools 是否以这种方式实现本机滚动溢出

if(Browser.version < 5.1) console.log('fix it with iScroll')
else console.log('the native scrolling is available');

问题:如果我将 webapp 保存到跳板,在全屏模式 Browser.versionBrowser.name 给我 '0''unknown'

if(Browser.version < 5.1 || Browser.version == 0) console.log('fix it with iScroll')
else console.log('the native scrolling is available');

上面的解决方案工作得很好,但我不想在iOS5上总是在全屏模式下使用iScroll,因为它不像原生滚动那样平滑。

我如何知道固件版本或者本机滚动是否可以在全屏模式下使用?

I need to know if -webkit-overflow-scrolling: touch; overflow: scroll; is available for my webapp, otherwise I get that feature with iScroll.

I'm checking with mootools if the native scrolling overflow is implemented in this way

if(Browser.version < 5.1) console.log('fix it with iScroll')
else console.log('the native scrolling is available');

The problem: if I save the webapp to the springboard, in fullscreen mode Browser.version or Browser.name gives me '0' or 'unknown'.

if(Browser.version < 5.1 || Browser.version == 0) console.log('fix it with iScroll')
else console.log('the native scrolling is available');

The solution above works perfectly, but I don't want to always use iScroll in fullscreen mode on iOS5, because it's not smooth as the native scroll.

How can I know the version of the firmware or if the native scrolling is available in fullscreen mode?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜还是长夜 2024-12-19 13:47:53

mootools 1.4.0 似乎有些问题。
要确定您是否运行 ios5(浏览器或全屏模式):

(/CPU OS 5_0/.test(navigator.userAgent) ? console.log('iOS5') : console.log('not iOS5');

Seems that something is broken with mootools 1.4.0.
To be sure if you're running ios5 (browser or fullscreen mode):

(/CPU OS 5_0/.test(navigator.userAgent) ? console.log('iOS5') : console.log('not iOS5');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文