@media媒体查询响应式布局
@media媒体查询响应式布局
1. 设置meta标签
2. 使用@media查询
1) 在.css文件中使用
@media screen and (max-width: 375px) {
#box {
background: #bfa;
width: 200px;
height: 200px;
}
}
2) 通过@import引入
@import './responseLayout375.css' screen and (max-width: 375px);
3) 通过标签引入