CSS3屏幕密集媒体查询

复制代码
 1 html { font-size: 50px; }
 2 body { font-size: 24px; }
 3 @media screen and (max-width: 359px) {
 4     html { font-size: 21.33px; }
 5     body { font-size: 12px; }
 6 }
 7 @media screen and (min-width: 360px) {
 8     html { font-size: 24px; }
 9     body { font-size: 12px; }
10 }
11 @media screen and (min-width: 375px) {
12     html { font-size: 25px; }
13     body { font-size: 12px; }
14 }
15 @media screen and (min-width: 384px) {
16     html { font-size: 25.6px; }
17     body { font-size: 14px; }
18 }
19 @media screen and (min-width: 400px) {
20     html { font-size: 26.67px; }
21     body { font-size: 14px; }
22 }
23 @media screen and (min-width: 414px) {
24     html { font-size: 27.6px; }
25     body { font-size: 14px; }
26 }
27 @media screen and (min-width: 424px) {
28     html { font-size: 28.27px; }
29     body { font-size: 14px; }
30 }
31 @media screen and (min-width: 480px) {
32     html { font-size: 32px; }
33     body { font-size: 15.36px; }
34 }
35 @media screen and (min-width: 540px) {
36     html { font-size: 36px; }
37     body { font-size: 17.28px; }
38 }
39 @media screen and (min-width: 720px) {
40     html { font-size: 48px; }
41     body { font-size: 23.04px; }
42 }
43 
44 @media screen and (min-width: 750px) {
45     html { font-size: 50px; }
46     body { font-size: 24px; }
47 }
复制代码

 字体设置由来对应说明

 

复制代码
/* 修复iphonex以上的底部安全区域问题 */
 //iphoneX、iphoneXs
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
  .ui-tab-bar {
    padding-bottom: 0.5rem !important;
  }
}

//iphone Xs Max
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio:3) {
  .ui-tab-bar {
    padding-bottom: 0.5rem !important;
  }
}

//iphone XR
@media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio:2) {
  .ui-tab-bar {
    padding-bottom: 0.5rem !important;
  }
}
复制代码

 

posted @   xuanPhoto  阅读(210)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
点击右上角即可分享
微信分享提示