Bootstrap 3在IE8中不起作用 [英] Bootstrap 3 Not Working in IE8

查看:121
本文介绍了Bootstrap 3在IE8中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在IE8的客户端站点上使用Bootstrap 3.我已经花了几个小时在网上搜刮,阅读了大量的论坛主题并提出了所有建议,但仍然无法正常工作.我已经包含了respond.jshtml5shiv.js并验证了它们是否已正确加载.该网站为 http://www.drollyankees.com/,这是我的代码:

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>

推荐答案

您需要更改此内容:

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

这篇关于Bootstrap 3在IE8中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆