javascript - 如何在 Bootstrap 3 中禁用 IE 的页面响应

标签 javascript css internet-explorer twitter-bootstrap-3

我想删除 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/

相关文章:

javascript - Gatsby Graphql 跳过

css - CSS-Grid 单元格中的小空间

c++ - 从 BHO ( C++ ) 向 CAxWindow 上的 JS 公开方法

css - 如何让从中页开始的 textarea 延伸到包含 div 的底部(并调整它的大小)?

html - 文本向右对齐,向左溢出

CSS 帮助 - IE 错位

php - ajax 脚本在 IE 中不起作用

javascript - jQuery 模糊问题

通过ajax更改内容后javascript不起作用

javascript - 文本框更新事件