HTML5 样板、X-UA 兼容和 Windows Phone 7
当我从 Windows Phone 7(或 7.5)查看时,我的大多数使用 H5BP 的新网站都遇到问题。问题在于,网站源代码中的这个 HTML 标记
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
实际上应该支持不同的移动设备,但却阻止了移动设备的用户(在我们的例子中是 Windows Phone 7 或更高版本的用户)放大文本(以及网站本身)。
使用此标签,移动浏览器将根据移动视口(即移动屏幕宽度和高度)调整网站的大小。然而,问题是,当用户尝试使用放大手势放大文本时,缩放不起作用。它尝试放大但很快返回到初始宽度。
有其他人注意到这个问题吗?如果是,解决方案是什么?
i am having an issue with most of my new sites which use H5BP when viewed from Windows Phone 7 (or 7.5). The problem is that this HTML tag in the site's source
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
which should actually support different mobile devices, prevents the user of a mobile device (in our case Windows Phone 7 or greater user) to zoom in on the text (and the site itself).
Using this tag the mobile browser will adjust the size of the site according to the mobile viewport (i.e. mobile screen width and height). However, the problem is, when the user tries to zoom in on the text using the zoom-in gesture, the zooming doesn't work. It tries to zoom in but quickly returns to the initial width.
Has anyone else noticed this problem and if so, what is the solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能需要测试添加
user-scalable=yes
以了解 Windows Phone 如何处理该标记。尽管几乎所有移动浏览器都支持该标签,但它不是标准标签(源自 iPhone),因此实现可能有所不同。我发现 Safari 拥有关于该标签的最佳文档,因此我在下面找到了它。
这个标签应该值得测试:
来源:Safari文档。
其他资源: 通过 Windows Phone 团队的 IE 移动视口。
You may want to test adding
user-scalable=yes
to see how Windows Phone handles the tag.Although the tag is supported by almost all mobile browsers it isn't a standard tag (originated on the iPhone) so the implementation may differ. I find that Safari has the best documentation on the tag and as such I sourced it below.
This tag should be worth testing:
Source: Safari Documentation.
Additional resource: IE Mobile Viewport via Windows Phone Team.
我没有 Windows Phone 来测试,但也许添加 user-scalable=yes 可能会对 Windows Mobile 有所帮助。
I don't have a windows phone to test but perhaps adding the user-scalable=yes may help on windows mobile.