Mobile Browser Orientation Rotation Support
I'm attem开发者_如何转开发pting to support rotations for iPhone/Android/BlackBerry when transitioning from portrait to landscape and vice versa.
Would there be any specific meta tags to support this? Otherwise, I'll probably look into detecting the orientation change and then stretch the width to fill the gap when going from portrait to landscape in Javascript.
Just throwing it out there if anyone has done this before.
Thanks.
You can do it with CSS media queries:
<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css" />
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css" />
If you are developing a mobile web site, then it is supported you do not need anything to do. But if you are developing a hybrid application by using a UIWebview, then you need to handle orientation changes in Objective-C.
精彩评论