2014-11-20 67 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