仅在某些页面上进行捏合缩放
是否有可能使移动网站在某些页面上具有捏合缩放功能,但在其他页面上不具有捏缩放功能,例如不在主页上,但在带有图像的页面上?我希望人们能够放大图像,但我不希望他们放大其他页面,因为文本变得非常小或非常大。
Is it possible to make a mobile website have pinch to zoom capabilities on some pages but not other, for example not on the home page, but on a page with a image on it? I want people to be able to zoom into images but I don't want them to zoom on other pages because the text gets really little or really big.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,让用户决定文本是否太大或太小是一个很好的做法。
但是,如果您确实想控制它,请使用视口元标记:
保持初始比例和最大比例相同,或者将用户可缩放设置为否,可以让您阻止用户缩放。将 user-scalable 设置为 yes 并调整初始比例和最大比例以设置页面开始缩放的方式以及用户可以放大到多远。
请参阅:
http://www.html5rocks.com/en/mobile /mobifying.html#toc-meta-viewport
Generally, it's good practice to let users decide if text is too large or small.
But, if you do want to control it, use the viewport meta-tag:
Keeping initial-scale and maximum-scale the same, or by setting user-scalable to no, will let you keep the user from zooming. Set user-scalable to yes and adjust the initial-scale and the maximum scale to set how zoomed in the page starts, and how far the user can zoom in to.
See:
http://www.html5rocks.com/en/mobile/mobifying.html#toc-meta-viewport