Why Bootstrap 3 navbar dropdown doesn't work in IE8?

本小妞迷上赌 提交于 2020-01-20 05:56:40

问题


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


回答1:


bootstrap3 workes fine with ie 8 only you have make sure to add respond.js , html5shiv and latest version of 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]-->  



回答2:


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.




回答3:


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)

Finally, use a web server (local or otherwise) to view your site because respond.js doesn't play well with file:// protocol




回答4:


Found this on another thread but revert your jquery to version 1.11.2 instead of 2+.




回答5:


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.



来源:https://stackoverflow.com/questions/18486163/why-bootstrap-3-navbar-dropdown-doesnt-work-in-ie8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!