Disable double tap zoom on Safari iOS 13 +

跟風遠走 提交于 2020-06-27 06:18:24

问题


How can we disable "double tap to zoom" on Safari iOS 13+ mobile?

Sometimes it zooms, sometimes not. i feel it may only work on specific HTML-elements.

And i read that "double tap to zoom" should be disabled on iOS 13 by default and only pinch-zoom should work, but that's not the case.


回答1:


You can add the below meta tag to stop zooming on ios devices.

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=0"/>

a css fix:

body{
    touch-action: manipulation;
}

Hope is helps.



来源:https://stackoverflow.com/questions/59732074/disable-double-tap-zoom-on-safari-ios-13

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