移动端常用@media screen跟字体大小

iphone各版本@media screen###

iPhone < 5:
@media screen and (device-aspect-ratio: 2/3) {}

iPhone 5:
@media screen and (device-aspect-ratio: 40/71) {}

iPhone 6 + iPhone 6 Plus:
@media only screen and (max-device-width: 640px), only screen and (max-device-width: 667px), only screen and (max-width: 480px){ 
    body .footer_placeholder{
        background-color: #fff;
    }
}

//iphone6
@media only screen
  and (min-device-width: 375px)
  and (max-device-width: 667px)
  and (orientation: portrait)
  and (-webkit-min-device-pixel-ratio: 2)
    {
        body .container .item-bd .tools .btn{
            margin-top: 2.7em;
        }
    }

//iphone6 plus

@media only screen 
  and (min-device-width: 414px) 
  and (max-device-width: 736px) 
  and (orientation: portrait) 
  and (-webkit-min-device-pixel-ratio: 3)
    { 
        body .container .item-bd .tools .btn{
            margin-top: 2.2em;
        }
    }

iPad:
@media screen and (device-aspect-ratio: 3/4) {}

移动端字体###

@media screen and (min-width:321px) and (max-width:375px) {
    html {
        font-size: 11px;
    }
}

@media screen and (min-width:376px) and (max-width:414px) {
    html {
        font-size: 12px;
    }
}
@media screen and (min-width:415px) and (max-width:639px) {
    html {
        font-size: 15px;
    }
}
@media screen and (min-width:640px) and (max-width:719px) {
    html {
        font-size: 20px;
    }
}
@media screen and (min-width:720px) and (max-width:749px) {
    html {
        font-size: 22.5px;
    }
}
@media screen and (min-width:750px) and (max-width:799px) {
    html {
        font-size: 23.5px;
    }
}

字体大小

@media screen and (max-width: 360px) {
                html {
                    font-size: 90px;
                }
            }
html {
    font-size: 100px;
}
body * {
    font-size: 0.16rem;
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • (开始)【01日本無碼】 〖http://120.52.73.65/data1.cache.directory/m...
    独名阅读 11,889评论 0 3
  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    wzhiq896阅读 5,763评论 0 2
  • 已经记不清楚有多久没有写过东西了,或许连一个优美的词语都写不出了吧。浑浑噩噩大半生。 回头看25年,似乎什么都不记...
    盛大帅阅读 1,930评论 0 0
  • “粮油一分利,百货十分利,珠宝百分利,古玩千分利”,华夏古董研究会会长伊有成用这句坊间流传的话概括古玩的投资价值...
    坐看云起2阅读 4,655评论 0 0
  • 工作日加班的晚上,8点下班后,我便奔赴约定地点,在地铁站口等了半个小时。 已经许久没有等人的感觉,很久没有约会,但...
    五月成长笔记阅读 1,859评论 0 0