使用Jquery Mobile在页面上的屏幕方向问题 [英] Screen Orientation Issue on Page using Jquery Mobile
问题描述
我刚刚开始研究移动网络应用程序,我正在使用Jquery Mobile制作HTML5页面。我在iPhone和iPhone上测试了我的页面iPad兼容。问题是,当我从纵向更改为横向,然后从横向模式更改为纵向模式时,我的页面仍然会放大。
如果在n个方向更改后,无论方向如何,我还能恢复到最佳缩放级别。我在元标记中使用了设备宽度,设备高度,设备密度
I have just started working on mobile web apps, i am making HTML5 pages using Jquery Mobile. I tested my pages on iPhone & iPad. The issue is that when i change from portrait to landscape and then from landscape to portrait mode, my pages remain zoomed in. How can i restore to the optimum zoom level whatever the orientation maybe, after n number of orientation changes. I have used device-width, device-height, device-density in my meta-tag
推荐答案
不确定从哪里获得你的,但这是我正在使用的视口元标记,我很确定它会解决你的问题:
Not sure from where you got yours, but this is the viewport meta tag that I am using and am pretty sure it will solve your problem:
<meta name="viewport" content="minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" />
更新:
你需要什么2个不同的视口,每个方向模式一个。
检查出来以了解如何动态更改它们。
you'll need 2 different viewports, one per orientation mode. check this out to see how to change them on the fly.
希望这有助于
这篇关于使用Jquery Mobile在页面上的屏幕方向问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!