【问题标题】:home screen web app cuts off part of the page when fullscreen全屏时主屏幕 Web 应用程序会截断部分页面
【发布时间】:2014-08-27 18:51:15
【问题描述】:

首先我不得不说我是这个网络应用主屏幕按钮主题的新手。 这些行:

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> 

到目前为止对我来说很酷,但是当方向从横向更改为纵向时会出现问题。然后应用程序只剪切浏览器 chrome 所在的部分,并在右侧留下一个白色区域。 奇怪的是,当我以纵向模式开始然后更改为横向时,一切正常,应该来回运行。 如何避免这种情况?

非常感谢您的帮助

加拉瓦尼

【问题讨论】:

    标签: ios ipad orientation homescreen


    【解决方案1】:

    以下代码解决了我的问题:

    $(window).on('orientationchange', function() {
                        // only necessary for home screen use
                        // otherwise blank space is left where the adress bar was (on orientation change from landscape to portrait)
                        document.body.scrollLeft = 0;               
                    } );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-14
      • 1970-01-01
      • 1970-01-01
      • 2011-04-17
      • 1970-01-01
      相关资源
      最近更新 更多