开发者

Media Queries - Landscape Mode on iPhone way too oversized

I'm using the following media query in my css:

@media screen and (max-device-width: 480px) {}

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.

I've tried this:

@media only screen and (开发者_如何学Pythonmin-device-width : 320px) and (max-device-width : 480px {}

Didn't help.

Any suggestions?

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.)

Thanks JD


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" /> 

By default, the iPhone reports a width of 980px.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜