CSS 媒体查询 IPHONE PC 常用尺寸总结

// iPhone 5/SE
@media only screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) {
height: calc(100vh - 34px);
}
// iPhoneX/iPhoneXs/iPhone11 Pro
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
height: calc(100vh - 34px);
}
// iPhoneXs Max/iPhone11 Pro Max
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) {
height: calc(100vh - 34px);
}
// iPhoneXR/iPhone11
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) {
height: calc(100vh - 34px);
}
// 13 mini/12 mini
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
height: calc(100vh - 34px);
}
// 14/13 Pro/12 Pro
@media only screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) {
height: calc(100vh - 34px);
}
// 14 Plus/13 Pro Max/12 Pro Max
@media only screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) {
height: calc(100vh - 34px);
}
// 14 Pro
@media only screen and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) {
height: calc(100vh - 34px);
}
// 14 Pro Max
@media only screen and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) {
height: calc(100vh - 34px);
}
@media screen and(min-width: 1024px){
body{font-size: 12px}
} /*>=1024的设备屏幕*/
 
@media screen and(min-width: 1100px) {
body{font-size: 14px}
} /*>=1100的设备屏幕*/
@media (min-width: 1280px) {
body{font-size: 18px;}
} /*>=1280的设备屏幕*/
 
@media screen and(min-width: 1366px) {
body{font-size: 20px;}
} /*>=1366的设备屏幕*/ 
 
@media screen and(min-width: 1440px) {
body{font-size: 24px;}
} /*>=1440的设备屏幕*/ 
 
@media screen and(min-width: 1680px) {
body{font-size: 26px;}
}  /*>=1680的设备屏幕*/ 
@media screen and(min-width: 1920px) {
body{font-size: 30px;}
}  /*>=1920的设备屏幕*/ 

推荐一个网址,获取一些常用设备信息 https://screensiz.es/

你可能感兴趣的:(css,iphone,媒体)