简体   繁体   English

Windows Phone PhoneGap应用程序不应缩放

[英]Windows Phone PhoneGap App should not be zoomable

I am developing Windows Phone PhoneGap app. 我正在开发Windows Phone PhoneGap应用程序。 Now the app is zoomable. 现在,该应用程序是可缩放的。 I want the app to be not zoomable. 我希望该应用程序不可缩放。 Any help is appreciated. 任何帮助表示赞赏。 I tried <meta name="viewport" content="user-scalable=no"> and <body style="-ms-touch-action: none;"> , they did not work. 我尝试了<meta name="viewport" content="user-scalable=no"><body style="-ms-touch-action: none;"> ,它们没有用。

This may help you: 这可以帮助您:

When you package an Enyo (or any HTML app) on WP7, the native WebBrowser control is used as the wrapper for your content. 在WP7上打包Enyo(或任何HTML应用程序)时,本机WebBrowser控件将用作内容的包装。 Like other platforms, you have the option of setting your viewport to control whether or not the user can pinch/zoom. 与其他平台一样,您可以选择设置视口以控制用户是否可以捏合/缩放。

<meta name="viewport" content="user-scalable=no">

http://forums.enyojs.com/discussion/353/windows-phone-7-disabling-the-default-pinch-zoom-scroll-snapback-behavior http://forums.enyojs.com/discussion/353/windows-phone-7-disabling-the-default-pinch-zoom-scroll-snapback-behavior

Try to add this meta tag in the head section of the page. 尝试在页面的head添加此元标记。

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

Use this code in your css. 在CSS中使用此代码。 This solved the problem for me. 这为我解决了问题。

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

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

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