2014-11-20 68 views
0

我有一段时间在诺基亚Lumia 930和1520上处于横向模式时显示bootstrap mobile nav。我甚至尝试了一些初学者引导程序模板,并且他们没有渲染移动导航,无论是从这些更大分辨率的WinMo设备中获取横向桌面导航。Bootstrap Mobile Nav Lumia 930/1520

任何想法我可以如何从媒体查询或其他东西的目标。在这一点上,我甚至会采取JS方法。

回答

0

为了其他任何人发现这一点,这就是固定对我来说

<script> 
    (function() { 
    if ("-ms-user-select" in document.documentElement.style && 
    (navigator.userAgent.match(/IEMobile/) || 
    navigator.userAgent.match(/ZuneWP7/) || 
    navigator.userAgent.match(/WPDesktop/))) { 
    var msViewportStyle = document.createElement("style"); 
    msViewportStyle.appendChild(
    document.createTextNode("@-ms-viewport{width:auto!important}") 
    ); 
    document.getElementsByTagName("head")[0].appendChild(msViewportStyle); 
    } 
    })();  
</script> 

,我发现这个在底部这篇文章的http://www.markadrake.com/blog/2013/05/31/responsive-design-concerns-for-windows-phone-and-ie-compatibility-modes/后,尝试了一堆不同的这些类型的脚本

0

IE Mobile 10不会按照指定启动媒体查询,它会不同地中断设备宽度。

此添加您拨打的第一个JS ...

(function() { 
    if ("-ms-user-select" in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/)) { 
     var msViewportStyle = document.createElement("style"); 
     msViewportStyle.appendChild(
      document.createTextNode("@-ms-viewport{width:auto!important}") 
     ); 
     document.getElementsByTagName("head")[0].appendChild(msViewportStyle); 
    } 
})(); 
+0

我试过这在我的脚本文件的底部,但它没有做任何事情。我会从最高层开始。我应该像以前一样把它放在头部,我称之为jQuery和Bootstrap.js?我也不是100%肯定这是真的,因为在肖像模式下,手机确实会触发媒体查询。只有在横向模式下,全部显示正确。另外值得一提的是所有其他的Lumia Phone都可以在肖像和风景中使用。这似乎有一个巨大的决议,不受媒体要求的影响。 – Travis 2014-11-21 13:11:26