[UWP]如何在WebView控件上禁用放大/缩小功能? [英] [UWP] How to disable Zoom In/Out feature on a WebView control?

查看:80
本文介绍了[UWP]如何在WebView控件上禁用放大/缩小功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

Hello imnbwd,


WebView控件本身没有办法禁用放大/缩小功能。
WebView类


如果您可以控制要导航到的页面,可以参考此SO线程:


http://stackoverflow.com/questions / 12664818 / how-to-disable-zoom-in-windows-8-webviews


参见 noxo 回复编辑该页面的CSS:

 html,body 
{
-ms-内容缩放:无;
}

有关如何编辑页面的信息,请参阅此处:


https://code.msdn.microsoft.com/windowsapps/How-to-zoom-inout-the-5a42229b


祝你好运,


Barry



解决方案

Hello imnbwd,

The WebView control itself does not have a way to disable zoom in/out. WebView class

If you have control of the page that you want to navigate to, you can refer to this SO thread:

http://stackoverflow.com/questions/12664818/how-to-disable-zoom-in-windows-8-webviews

See noxo's reply to edit CSS of that page:

html, body
{
  -ms-content-zooming:none;    
}

For how to edit your page, see here:

https://code.msdn.microsoft.com/windowsapps/How-to-zoom-inout-the-5a42229b

Best regards,

Barry


这篇关于[UWP]如何在WebView控件上禁用放大/缩小功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆