twitter-bootstrap 为什么 Bootstrap 3 导航栏下拉菜单在 IE8 中不起作用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18486163/
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
Why Bootstrap 3 navbar dropdown doesn't work in IE8?
提问by Inventor
The bootstrap 3 dropdown doesn't work in IE8, I don't know why, any help on that. some people say because BS added CSS filter property
bootstrap 3 下拉菜单在 IE8 中不起作用,我不知道为什么,对此有任何帮助。有人说是因为BS添加了CSS过滤器属性
回答by Venu immadi
bootstrap3 workes fine with ie 8 only you have make sure to add respond.js , html5shiv and latest version of jQuery
bootstrap3 与 ie 8 一起工作正常,只有你确保添加 respond.js 、 html5shiv 和最新版本的 jQuery
like this:
像这样:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
回答by Sam IR
I have tested this so many time in localhost.It will never work in localhost,Jut upload the same folder on your server and then check it will 100% work.
我已经在 localhost 中测试了很多次。它永远不会在 localhost 中工作,只需在您的服务器上上传相同的文件夹,然后检查它是否会 100% 工作。
回答by Artvader
Include these two script:
包括这两个脚本:
<script type='text/javascript' src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script type='text/javascript' src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
Then use jQuery version LESS than 2 (jQuery 2++ doesn't support IE8 anymore)
然后使用小于 2 的 jQuery 版本(jQuery 2++ 不再支持 IE8)
Finally, use a web server (local or otherwise) to view your site because respond.js doesn't play well with file:// protocol
最后,使用网络服务器(本地或其他方式)查看您的站点,因为 response.js 不能很好地与 file:// 协议配合使用
回答by CRM Web Updates
Found this on another thread but revert your jquery to version 1.11.2 instead of 2+.
在另一个线程上找到了这个,但将您的 jquery 恢复到 1.11.2 版而不是 2+ 版。
回答by Leo
To solve the problem on the same server you host your site compatibility files ( html5shiv and Respond ) and will have , again , host the bootstrap files and not use the CDN . Otherwise compatibility with IE 8 will not operate.
要在您托管站点兼容性文件(html5shiv 和 Respond)的同一台服务器上解决该问题,并且将再次托管引导文件而不使用 CDN。否则与 IE 8 的兼容性将无法运行。

