2016-11-08 138 views
0

我有一个使用jQuery Mobile创建的网站。我想要禁用缩放功能,或者禁止用户使用缩放缩放或同时用2根手指轻敲。防止在网站中使用触摸屏进行缩放(IE 11,Win 10)

我正在寻找答案,但我找不到一个有效的答案。

我尝试使用meta标签:

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

也试过:

body { -ms-content-zooming: none }, 
html { -ms-content-zooming: none }, 
.ui-page { -ms-content-zooming: none } 

这些解决方案的工作无。

+0

校验类似位http://stackoverflow.com/questions/6397748/whats-the-point-of-meta-viewport-user-scalable-no-in-the -google-maps-api – kplshrm7

回答

0

因此,经过更多的研究,我终于找到了解决我的问题。不是最帅的一个,但它适用于我。
我不得不添加一个额外的密钥到Internet Explorer注册表(HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Zoom)以防止任何缩放。 全导可以发现HERE

1

尝试user-scalable = no而不是user-scalable = 0

+0

我也试过这个,不幸的是它不起作用。 – TheWandererr

相关问题