繁体   English   中英

禁用捏放大Windows 8 Cordova应用

[英]Disable pinch to zoom in windows 8 cordova app

科尔多瓦继续在Windows 8上进行缩放时遇到问题。这是我使用的meta标签,应根据文档将其禁用:

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

知道我缺少什么吗?

尝试这个 ::

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


    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
    }

    body {
        -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
        -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
        -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
        /*background-color:#E4E4E4;*/
    }

对于任何遇到此问题的人,解决方案(除了视口元标记之外)是将其添加到您的CSS中:

body{
    touch-action: pan-y; /* prevent touch actions except vertical scroll */
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM