您现在的位置:首页 >> 前端 >> 内容

Bootstrap-3.3.7

时间:2016/12/30 10:00:50 点击:

  核心提示:安装检查bootstrap语法错误的插件的命令:npm install -g bootlint检查html语法错误的命令:bootlint/path/to/some/webpage.htmlanoth...
安装检查bootstrap语法错误的插件的命令:

npm install -g bootlint

检查html语法错误的命令:

bootlint/path/to/some/webpage.htmlanotherwebpage.html[…]忽略错误 bootlint -d W002,E020 /path/to/some/webpage.html another_webpage.html […]

对某个语句快速检查

$ bootlint << EOF
<button class="btn btn-default">Is this correct Bootstrap markup, Bootlint?</button>
EOF

在js文件加入下面这句,可以在控制台查看bootstrap的html的错误

(function() {
    var s = document.createElement(“script”);
    s.onload = function() {
        bootlint.showLintReportForCurrentDocument([]);
    };
    s.src = ”https: //maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js”;document.body.appendChild(s)})();

IE8:box-sizing和min-width, max-width, min-height, or max-height一起使用时,有时会失效

IE8:@font-face和:before一起使用,会出现问题

IE10:不能区分device width和 viewport width,所以不能使用媒体查询

解决方法:

@ - ms - viewport {
    width: device - width;
}

Windows Phone 8的Update 3 以下版本也存在这个问题

解决方法:

@ - ms - viewport {
    width: device - width;
}@ - o - viewport {
    width: device - width;
}@viewport {
    width: device - width;
}

// Copyright 2014-2015 Twitter, Inc. 
// Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 
if (navigator.userAgent.match(/IEMobile\/10.0/)) {
    var msViewportStyle = document.createElement(‘style’) msViewportStyle.appendChild(document.createTextNode(‘@ - ms - viewport {
        width: auto ! important
    }’)) document.querySelector(‘head’).appendChild(msViewportStyle)
}

Tags:BO OO OT TS 
作者:网络 来源:wangnantjo