禁用 iOS 文本输入缩放?
我正在开发一个 iOS Web 应用程序,并且我将视口设置为不可缩放...
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;" />
问题是,当我专注于输入文本字段时,它会放大并且不会缩小:
如何防止这种情况发生?
I'm working on an iOS web app and I have the viewport set to not scalable via...
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;" />
The problem is that when I focus on an input text field, it zooms in and doesn't zoom out:
How can I prevent this?
Full size image: https://i.sstatic.net/N50Vg.png
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找的答案是:
这可以防止它扩展。
I think the answer you are looking for is:
This prevents it from scaling.
问题是这个标签,
-webkit-overflow-scrolling: touch;
在iOS5中确实有bug,从
div
中删除它后,缩放问题并没有发生再次。The problem was this tag,
-webkit-overflow-scrolling: touch;
It's been really buggy in iOS5, and after removing it from the
div
, the zoom problem did not happen again.