twitter-bootstrap Twitter Bootstrap 和 respond.js 在 IE8 中太敏感了
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20893015/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Twitter Bootstrap and respond.js too responsive in IE8
提问by Terri Swiatek
I'm having some issues with testing Twitter Bootstrap v3 in IE8. The problem seems to be the layout goes completely responsive in IE8 instead of showing the desktop version on the desktop using Windows 7.
我在 IE8 中测试 Twitter Bootstrap v3 时遇到了一些问题。问题似乎是布局在 IE8 中完全响应,而不是在使用 Windows 7 的桌面上显示桌面版本。
This is the code in my head:
这是我脑海中的代码:
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
I see one of their examples works just fine, so I'm not sure what's going wrong here.
我看到他们的一个例子工作得很好,所以我不确定这里出了什么问题。
回答by asherstoppard
Respond.js only works with local CSS files unless additional steps are taken. I would recommend serving your 'bootstrap.css' file locally as a simple fix.
Respond.js 仅适用于本地 CSS 文件,除非采取其他步骤。我建议在本地提供您的“bootstrap.css”文件作为一个简单的修复。
More information can be found at http://getbootstrap.com/getting-started/#browsers
回答by Terri Swiatek
Thanks! I think that is the issue. I didn't realize you can't use the CDN.
谢谢!我认为这就是问题所在。我没有意识到你不能使用 CDN。
I just found this thread as well that goes over several things: IE8 issue with Twitter Bootstrap 3
我刚刚发现这个线程也涉及几件事: IE8 issue with Twitter Bootstrap 3
I'll go through and I'm sure that and some combination of these items should do the trick.
我会通过,我相信这些项目的一些组合应该可以解决问题。

