【问题标题】:how to get iPhone or iPad browser/firmware version in fullscreen mode如何在全屏模式下获取 iPhone 或 iPad 浏览器/固件版本
【发布时间】:2011-10-26 13:28:03
【问题描述】:

我需要知道 -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,因为它不像原生滚动那样流畅。

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

【问题讨论】:

    标签: iphone ios ipad webkit mobile-safari


    【解决方案1】:

    似乎 mootools 1.4.0 出现了问题。 确定您是否正在运行 ios5(浏览器或全屏模式):

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

    【讨论】:

      猜你喜欢
      • 2013-08-07
      • 1970-01-01
      • 1970-01-01
      • 2011-09-11
      • 1970-01-01
      • 1970-01-01
      • 2012-01-01
      • 2013-03-08
      • 1970-01-01
      相关资源
      最近更新 更多