媒体查询 - Css仅适用于iPhone Landscape [英] Media Queries - Css only for iPhone Landscape

查看:120
本文介绍了媒体查询 - Css仅适用于iPhone Landscape的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否使用相同的方法在横向模式下仅为iPhone写CSS?
谢谢

Are same methods to write css only for iPhone in landscape mode ? thank you

推荐答案

您可以这样做

<meta name="viewport" content="width=device-width, 
    minimum-scale=1.0, maximum-scale=1.0">

这会强制iPhone渲染视口与设备宽度相同。

That forces the iPhone to render viewport the same as the device width.

然后使用此CSS定位横向模式,即 + 320px

Then use this css to target the landscape mode, which is +320px wide

@media screen and (min-width: 321px){
    //styles
}

这篇关于媒体查询 - Css仅适用于iPhone Landscape的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆