参考bootstrap3的文档以及(https://github.com/scottjehl/Respond/),下载response.js 引入到html页面中
下面是关键代码
<link href="css/test.css" rel="stylesheet"/>
<link href="css/test2.css" media="screen and (max-width: 1366px)" rel="stylesheet"/>
<script src="js/response.1.4.2.js"></script>
***************必须在服务器运行,例如本地服务器(http://localhost:3366/vue.html)本地文件不能访问,亲测本地访问的话,文件response在ie8中拒绝访问
test.css代码如下
body {
background: red;
}
test2.css代码如下
@media screen and (max-width: 1366px){
body {
background: green;
}
}