CSS定向媒体查询 [英] CSS orientation media query

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

问题描述

有人可以向我解释orientation媒体功能用外行的话是什么吗?

Can some one explain to me what the orientation media feature does in layman's terms?

推荐答案

它主要用于手机等移动设备.您可以根据设备是垂直放置还是侧面放置来控制样式.

It's mainly for mobile devices like a phone. You can control the style based on whether the device is being held upright, or sideways ...

@media all and (orientation:portrait)
{
  /* Your CSS here */
}

 

@media all and (orientation:landscape)
{
  /* Your CSS here */
}

这篇关于CSS定向媒体查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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