开发者

Mobile Safari (iphone) Doesn't zoom in when turned horozontally

So I've built a site specifically for iphones that is 320px wide. It looks great in portrait orientation, but there is a ton of white space on the right when it is turned into landscape mode on the iphone.

I'd like to figure out how t开发者_如何学Pythono make the viewport zoom into view just the 320px in landscape orientation. This way, there isn't a ton of white space.

I suspect it has something to do with viewport. This is what I currently have:

<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" /> 

But that's not working. Any ideas?

Thanks, Brad


Try removing "user-scalable=no", or define "maximum-scale"

It is preferable to define width (of div's etc') in percentage instead of defined pixels. That way the width adjusts to the size of the screen automatically.

There are many good tutorials on responsive design.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜