How to disable zooming capabilities in responsive design?

会有一股神秘感。 提交于 2019-12-03 04:56:00

问题


How can I disable zoom-in and zoom-out capability in responsive design pages while using iPad, iPhone and/or some other smartphone.

Is there any way to control it?


回答1:


Create a META viewport tag, and set the user-scalable property to 'no', like this:

<meta name="viewport" content="user-scalable=no" />

Updated answer:-

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">



回答2:


This pretty much discriminates against anyone over 30, suppressing zoom just forces them to use reading glasses. Which may be your intent.

One of the workarounds for such users is to use RDP or VNC to view a desktop browser and "pinch" the view of that.

Question should maybe read "how to disable" or "how to suppress". You should of course discern your devices using the user agent string.



来源:https://stackoverflow.com/questions/13215730/how-to-disable-zooming-capabilities-in-responsive-design

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!