怎样解释bootstrap在ie下出现的这个灵异现象

蟹妖,简单来看是因为响应式失效了,在IE8下BS实现响应式需要一个respond.js的支持,因为IE8本身不支持media query,而这个js的使用说明中明确注明需要在服务器环境下使用,也就是你本地直接访问文件是失效的。
■网友
文档:Getting started · BootstrapInternet Explorer 8 and Respond.jsBeware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.
Respond.js and cross-domain CSSUsing Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. See the Respond.js docs for details.
Respond.js and file:// 【怎样解释bootstrap在ie下出现的这个灵异现象】 Due to browser security rules, Respond.js doesn\u0026#39;t work with pages viewed via the file:// protocol (like when opening a local HTML file). To test responsive features in IE8, view your pages over HTTP(S). See the Respond.js docs for details.

■网友
这个是你没有拖回在ie9以下启用么一个js。或者是那个js是属于跨域调用失效了。具体你可以打开控制台就可以看到一个404错误的js未导入
■网友
没看过BS3源码,不过想来它也是基于媒体查询的,IE8不支持媒体查询,我猜是这样。刚才看了下bootstrap官网,F12后看了col-md-n元素的样式定义,印证了想法。它们的宽度百分比就是在媒体查询中定义的。


    推荐阅读