<!-- 当宽度小于600px时执行样式 -->
@media screen and (max-width: 600px) {
.class {
background: #ccc;
}
}
<!-- 或者引入外链接 -->
<link rel="stylesheet" media="screen and (max-width: 600px)" href="small.css" />
<!-- 当宽度小于600px时执行样式 -->
@media screen and (max-width: 600px) {
.class {
background: #ccc;
}
}
<!-- 或者引入外链接 -->
<link rel="stylesheet" media="screen and (max-width: 600px)" href="small.css" />