zoukankan      html  css  js  c++  java
  • CSS3屏幕密集媒体查询

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

     字体设置由来对应说明

    /* 修复iphonex以上的底部安全区域问题 */
     //iphoneX、iphoneXs
    @media only screen and (device- 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- 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- 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio:2) {
      .ui-tab-bar {
        padding-bottom: 0.5rem !important;
      }
    }
  • 相关阅读:
    Condition Variables
    Cocos2d-x执行时错误:Cocos2d: Get data from file(xxx.xxx) failed!
    HDU
    Android context空指针异常
    linux c server and client 简单的通信
    UVM:8.4.3 用factory 机制创建实例的接口
    5.4 桥接模式(4.2)
    rac安装_grid安装校验报错之grid未建立信任关系
    git 使用ss5代理
    convmv 解决GBK 迁移到 UTF-8 ,中文 文件名乱码
  • 原文地址:https://www.cnblogs.com/Model-Zachary/p/6095324.html
Copyright © 2011-2022 走看看