Bootstrap 3 Not Working in IE8

二次信任 提交于 2019-12-11 02:55:37

问题


I cannot get Bootstrap 3 working on my client's site in IE8. I have scoured the web for hours reading tons of forums threads and doing all the suggestions but it is still not working. I have included respond.js and html5shiv.js and verified that they are being loaded properly. The site is http://www.drollyankees.com/ and here is what my code looks like:

<!DOCTYPE html>
<html lang="en-US" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bird Feeders &amp; Accessories | Droll Yankees</title>
    <link rel='stylesheet' id='bootstrap-css'  href='http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css?ver=3.8' type='text/css' media='all' />

    <!--[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]-->
</head>
<body>
    <!-- blah blah blah -->
    <script type='text/javascript' src='http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js?ver=3.8'></script>
</body>
</html>

回答1:


You need to change this:

<!--[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]-->

To something like this (using whatever is the relative path for your site):

<!--[if lt IE 9]>
<script src="/path/to/your/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="/path/to/your/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->


来源:https://stackoverflow.com/questions/21173290/bootstrap-3-not-working-in-ie8

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