Phonegap + Windows Phone 8 : viewport meta & scaling issue

前端 未结 3 710
执念已碎
执念已碎 2020-12-03 19:12

I\'m currently working on a Phonegap app and I have the following problem when testing it with Windows Phone 8 (left screenshot below): the application bar is not removed an

相关标签:
3条回答
  • 2020-12-03 19:42

    You can take this code to your css:

    * {
        zoom:1;
        -ms-content-zooming:none;
    }
    

    This solved the problem for me.

    0 讨论(0)
  • 2020-12-03 19:43

    Include this in Index.html,

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, target-densitydpi=medium-dpi, user-scalable=0" />
    

    Include this in CSS:

    @viewport
    {
    width:320px;
    }
    
    @-ms-viewport {
    width:320px;
    zoom-user:fixed;
    max-zoom:1;
    min-zoom:1;
    }
    

    and include also this,

    body, html { 
      -ms-overflow-style: none !important; 
    }
    

    This will solve the issue for now, it worked for me in the same situation..!! :-)

    0 讨论(0)
  • 2020-12-03 19:43

    There is a plugin available for the viewport fix:

    http://plugreg.com/plugin/lisovin/cordova-wp8-viewport

    0 讨论(0)
提交回复
热议问题