您的位置:首页 > 其它

bootatrap3下兼容ie8解决方法

2016-07-29 11:50 232 查看
bootstrap前端框架美观,而ie8是不兼容的。

兼容解决方案如下(以下改动不影响其它浏览器):

1.加上

<!DOCTYPE html>


2.加上

<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />


3.加上

<!--[if lt IE 9]>
<script src="http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->


4.jquery选用1版本的

<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>


5.ie8下不能用window.innerHeight与innerWidth。

换为document.documentElement.clientHeight与document.documentElement.clientWidth。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  兼容