禁用捏缩放Windows 8 Cordova应用程序

时间:2014-06-19 19:50:59

标签: html cordova windows-8

有关cordova继续在Windows 8上进行缩放缩放的问题。以下我使用的元标记应根据文档禁用它:

<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" />

知道我错过了什么吗?

2 个答案:

答案 0 :(得分:0)

试试这个::

    <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;*/
    }

答案 1 :(得分:0)

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

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