使用 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不确定你从哪里得到的,但这是我正在使用的视口元标记,我很确定它会解决你的问题:
更新:
你将需要 2 个不同的视口,每个方向模式一个。
查看一下以了解如何即时更改它们。
希望这有帮助
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:
UPDATE:
you'll need 2 different viewports, one per orientation mode.
check this out to see how to change them on the fly.
Hope this helps
我有同样的问题。
这篇文章回答了你的问题:
JQuery 移动当旋转到横向时,Beta 1 不会调整 iPhone 上的屏幕大小
虽然我不使用 Beta,而是使用 1.1.0 版本,但解决方案已应用。
简而言之,您的视口元应该如下所示。
I have the same problem.
This post answers your question:
JQuery Mobile Beta 1 is not resizing the screen on iphone when rotated to landscape
Although I do not use Beta but version 1.1.0, the solution applied.
In short, your Viewport Meta should look like this.
<meta name="viewport" content="initial-scale=1, maximum-scale=1">