我已将网页上传到网络服务器。当我用IE浏览器并将浏览器模式切换到IE 8或IE 7以查看是否下载了html5shiv和respond.js时,我发现它们不是。谁知道为什么?我使用bootstrap的推荐模板,在a中添加了一些代码。这是代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<h1>Hello, world!</h1>
<section>
<h2>how are you doing ?</h2>
</section>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>
我上传的页面有http://toto3000.byethost24.com/bootstrap/basic%20ii.html
答案 0 :(得分:1)
通过添加前缀(http://)来纠正您的第一个链接。
FROM://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css TO:http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css
您的浏览器正在尝试使用文件protocole(file://)
答案 1 :(得分:0)
有效。我正在切换&#34;浏览器模式&#34;在IE而不是&#34;文档模式&#34;这就是我无法看到这些文件的原因。我的错。