准备工作2:加载兼容文件JS 因为IE8既不支持HTML5也不支持CSS3 Media,所以我们需要加载两个JS文件,来保证我们的代码实现兼容效果: <!--[ifltIE9]> <scrip
准备工作2:加载兼容文件JS
因为IE8既不支持HTML5也不支持CSS3 Media,所以我们需要加载两个JS文件,来保证我们的代码实现兼容效果:
- <!--[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]-
ie渲染为最新文档
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
Rem兼容ie6 ie7
box { font-size: 14px; /* 用来兼容ie678 */ font-size: 0.875em; }
/***********************************************/
响应式适配
html {font-size: calc(100vw/3.75);}