我想删除 Bootstrap 3 中的页面响应,但仅限于 Internet Explorer 版本。我已经查看了 remove page responsiveness 的文档总体而言,但它可以特定于设备或浏览器吗?
最佳答案
针对 IE8 和 9 的快速而肮脏的 javascript 解决方案:(假设网格大小约为 980)
if ( ( (/msie 8./i).test(navigator.appVersion) || (/msie 9./i).test(navigator.appVersion) ) {
var body = document.querySelector('body');
body.style.minWidth = '980px';
}
如果您在 <html>
上设置类,您也可以使用 CSS 完成此操作IE 条件中的标签。
假设<html class="ie8">
例如,
html.ie8 {
min-width : 980px;
}
html.ie8 body {
min-width : 980px;
}
一个更彻底的方法是用你自己的覆盖@media 调用,再次针对 ie html 类,并使用 css load hierarchy 或奇怪的 !important
标记以完成它。
关于javascript - 如何在 Bootstrap 3 中禁用 IE 的页面响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25088852/