屏幕尺寸非常多,碎片化严重。尤其是Android,你会听到很多种分辨率:480x800, 480x854, 540x960, 720x1280, 1080x1920,而且还有传说中的2K屏。近年来iPhone的碎片化也加剧了:640x960, 640x1136, 750x1334, 1242x2208。
不管是设计师还是前端工程师,一定要遵守这些尺寸,不要设计超出版心的事.一定要多沟通
/*版心*/
@media screen and (max-width:1200px) and (min-width:1024px){
.w{
width:1024px;
margin:0 auto;
position: relative;
}
}
@media screen and (max-width:1024px){
.w{
width:960px;
margin:0 auto;
position: relative;
}
}
@media screen and (min-width:1200px){
.w{
width:1200px;
margin:0 auto;
position: relative;
}
}