网页屏幕分辨率
1920*1080 26.7%
1600*900 7.42%
1366*768 21.97%
1024*768 4.84%
1680*1050 3.68%
基础格式
body {//1600-1920
...//其它样式
font-size: 13px;//必须
}
@media only screen and (max-width: 1360px) {//1366-1600
body {
font-size: 12px;
}
.
.
.//其它对象
}
@media only screen and (max-width: 1161px) { //0-1366
body {
font-size: 10px;
}
.
.
.//其它对象
}
对象里需要调整font-size时 以上述font-size为基础进行调整
例如
a{//1920
font-size:30px;
}
则 换算成em
a{//1920
font-size:1.875em;(30px/16px)
}
例如
a{//1366
font-size:18px;
}
则换算成em
a{//1366
font-size:1.5em;(18px/12px)
}