问题描述
如何在WinRT上通过IE11访问的网页禁用所有视口缩放?
How can I disable ALL viewport zooming for a webpage accessed via IE11 on WinRT?
我正在处理一个应用程序,以适应视口,并在内部提供自己的缩放功能。有浏览器缩放,然后使画布乱七八糟。
I'm working on an application that does it's own drawing on a canvas sized to fit the viewport, and provides it's own zoom functionality internally. Having the browser zoom then makes a mess of the canvas.
我一直在浏览现有的答案,并没有一个似乎工作的这种平台:
I've been going through existing answers, and none of them seem to work for this plaform:
< meta name =viewportcontent =width = device-width,initial-scale = 1,maximum-scale = 1,user-scalable = 0/>
或
< meta name =viewportcontent =width = device-width ; initial-scale = 1.0; maximum-scale = 1.0; user-scalable = 0;>
或
< meta name =viewportcontent =width = device-width,initial-scale = 1,maximum-scale = 1/>
或
< meta name =viewportcontent =user-scalable = no/>
或
< meta name =viewportcontent =width = device-width/>
在< header>
中没有任何效果。
-zooming,但我看过的各种jQuery片段在这里似乎都不起作用。
Additionally, I'd like to block double-tap-zooming, but the various jQuery snippets I've seen don't seem to work here either.
推荐答案
Arrrgh很快,当我问的问题,我发现一个解决方案:
Arrrgh, so as soon as I asked the question, I found a solution:
添加:
html
{
-ms-content-zooming: none; /* Disables zooming */
touch-action: none; /* Disable any special actions on tap/touch */
}
应用程序页面会正常阻止IE中的捏缩放,并禁用通过点按/双击触发的任何特殊操作。
to the CSS for the application page appears to properly block pinch-zoom in IE, and disable any of the special actions triggered by tapping/double-tapping.
这篇关于在Windows8-Arm上禁用IE11中的所有页面缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!