当前位置: 首页 > 工具软件 > Bootstrap-IE6 > 使用案例 >

让bootstrap兼容ie6 ie7 ie8 ie9 ie10 ie11的解决方法

越国源
2023-12-01
前两天遇到要bootstrap兼容ie各个版本的问题,但是各种百度,各种博客,最后算是解决了,但是迷迷糊糊的,现在来总结一下,如有雷同纯属总结。
首先看看代码的模样:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<title> </title>
<link rel="stylesheet" type="text/css" href="bootstrap-3.3.5-dist/css/bootstrap.css"  media="screen"/>
<link rel="stylesheet" type="text/css" href="bootstrap-3.3.5-dist/css/bootstrap-theme.css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/front/style.css" media="screen" />


<script src="js/jquery-1.11.1.js"></script>

<!--[if lte IE 9]>
<link rel="stylesheet" type="text/css" href="css/front/ie.css" media="screen" />//针对ie9以下浏览器修改代码
<script src="bootstrap-3.3.5-dist/js/respond.js"></script>
//Respond.js 是一个快速、轻量的 polyfill,用于为 IE6-8 以及其它不支持 CSS3 Media Queries 的浏览器提供媒体查询的 min-width 和 max-width 特性
<script src="bootstrap-3.3.5-dist/js/html5.js"></script>//,让IE(包括IE6)支持HTML5元素
<script src="bootstrap-3.3.5-dist/js/css3-mediaqueries.js"></script>//解决IE8及低版本浏览器不支持CSS3 
<![endif]-->
<!--bootstrap兼容ie8,css3兼容mediaqurey-->

<script src="bootstrap-3.3.5-dist/js/bootstrap.js"></script>
</head>
<body>
</body>
</html>

说明:
1.ie.css这是自己写的
2.respond.js、html5.js、css3-mediaqueries.js可以百度到的。稍后我也会上传到我的资源里

 类似资料: