开发者

Is it possible to prevent the "flipping" in an iPhone website via JavaScript/jQuery?

I just don开发者_如何学运维't want the site change orientation when iPhone change orientation.

Is it possible?


You can't prevent this via JavaScript, it's browser controlled...and really you'd be breaking the user's expectations of behavior if you could do this, which is hardly ever a good thing.

Also if you could, which orientation would the user be in? When they arrived on your site the phone could have been in either orientation.


See this answer for how to use CSS/JS to rotate the rendered display on orientation change. The idea is to capture the orientation event, and then force the display back to portrait/landscape.

How do I lock the orientation to portrait mode in a iPhone Web Application?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜