jquery - 在 Lumia 930/1520 上 Bootstrap 移动导航

标签 jquery html css twitter-bootstrap

当 Nokia Lumia 930 和 1520 处于横向模式时,我在显示 Bootstrap 移动导航时遇到了麻烦。我什至尝试了一些入门 Bootstrap 模板,但它们不会呈现移动导航,或者您从这些更高分辨率的 WinMo 设备获得横向桌面导航。

知道如何通过媒体查询或其他方式定位这些内容。在这一点上,我什至会采用 JS 方法。

最佳答案

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);
    }
})();

关于jquery - 在 Lumia 930/1520 上 Bootstrap 移动导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27050110/

相关文章:

javascript - 使用 jquery/php 从下拉列表中获取即时结果

javascript - tinyMCE 模糊事件

php - 允许用户使用 jquery 创建并提交最多 5 个文本框,并在 php 中将它们解析为一个数组?

javascript - 如何在 "onclick"事件期间加载外部 Javascript 文件?

jquery - 使用 javascript 检查客户端上缓存了哪个 CDN jQuery

javascript - 选择一个元素 | Javascript 与 Jquery

html - 如何在此表单字段的末尾添加一个按钮并保留 Bootstrap 样式

css - 斜体覆盖标准?

javascript - 将两个用户号码输入存储在变量中,验证为数字,并写入两位数的总和

html - 如何在不损坏原始排列的情况下将文本放在图像上?