【问题标题】:How to disable double click zooming on iPad? [duplicate]如何在 iPad 上禁用双击缩放? [复制]
【发布时间】:2018-10-17 08:21:56
【问题描述】:

当我双击 hml 页面上的某处时,iPad 上会出现缩放效果。

如何禁用此行为?

【问题讨论】:

    标签: javascript jquery html css ipad


    【解决方案1】:

    您是否尝试过将 css 属性 touch-action 设置为 none?

    .disable-zoom {
        touch-action: none;
    }

    这会禁用屏幕上的所有操作。 如果您只想禁用双击并执行其他操作,例如捏缩放等,请使用以下

    .disable-double-tap {
      touch-action: manipulate;
    }

    【讨论】:

    • 感谢您的支持。
    【解决方案2】:

    您所要做的就是在您的 html 代码中添加一个meta 标签:

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

    【讨论】:

    猜你喜欢
    • 2011-12-25
    • 1970-01-01
    • 2022-08-12
    • 2020-05-01
    • 2012-02-19
    • 1970-01-01
    • 2014-01-23
    • 1970-01-01
    • 2012-07-31
    相关资源
    最近更新 更多