问题描述:

I'm attempting 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.

相关阅读:
Top