启用放大移动网站 [英] Enable zoom in mobile website
问题描述
我正在开发一个移动网站。但缩放效果在我的页面上不起作用。我在页面中使用了以下标记。
I'm developing a mobile web site. But the zoom effect is not working on my pages. I've used the following tag in the pages.
<meta name="viewport"
content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
我想知道:
-
是否可以通过此标签获得缩放效果以及如何正确使用它?
Is it possible to get the zoom effect with this tag and how to use it in correct way?
有没有我可以用于此目的的更多标签?
Are there any more tags I can use for this purpose?
我们的客户群主要在iPhone上。在为iPhone用户开发移动网站时,我应该考虑/使用特殊的东西/技术吗?
Our client base is mostly on iPhone. Are there special things/techniques I should consider/use when developing a mobile web site for iPhone users?
推荐答案
这是因为您已将最大比例设置为最小量(1.0),这意味着它不会在最初渲染的范围之外进行缩放。您需要在该元标记中将最大比例设置为介于1.0和10.0之间的其他值。 Apple默认使用的最大比例为5.0 Apple的文档。
This is because you've set the maximum-scale to the minimum amount (1.0) which means it won't be zoomable beyond what is rendered initially. You need to set the maximum-scale to something else between 1.0 and 10.0 in that meta tag. The default by Apple is to have the maximum-scale as 5.0 as per Apple's Documentation.
Apple关于元标记的文档有一个关于视口属性的表,列出了可以使用的所有视口元标记
Apple's Documentation on Meta Tags has a table on Viewport properties which list all the viewport meta tags which can be used
这篇关于启用放大移动网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!