媒体查询 - 风景模式在iPhone的方式太大了 [英] Media Queries - Landscape Mode on iPhone way too oversized
问题描述
我在我的css中使用以下媒体查询:
I'm using the following media query in my css:
@media screen and (max-device-width: 480px) {}
这看起来对我老iPhone 3g ...但是当我改变方向
This looks fine on my older iphone 3g ... but when I change orientation from portrait to landscape.. it blows up.. way too big, way too wide.
我试过这个:
@media only screen and (min-device-width : 320px) and (max-device-width : 480px {}
没有帮助。
有任何建议吗?
我宁愿不把一个横向特定的查询 - 我想要一个通用的,如果可能的话。
I would rather NOT put in a landscape specific query - I would like a generic one if possible.
(和是夹捏屏幕有点工作。但不是我正在寻找的用户体验。)
(and Yes pinching the screen down kinda works.. but is not the user experience I am looking for.)
感谢
JD
Thanks JD
推荐答案
您有元视口标签吗?如果没有,您可以使用以下方式告诉iPhone将其视口宽度报告为px中的屏幕宽度:
Do you have a meta viewport tag? If not, you can use the following to tell the iPhone to report its viewport width as the width of the screen in px:
<meta name="viewport" content="width=device-width" />
默认情况下,报告宽度为980像素。
By default, the iPhone reports a width of 980px.
这篇关于媒体查询 - 风景模式在iPhone的方式太大了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!