首页 > 技术文章 > UWP WebView 禁用缩放

sun8134 2017-08-24 09:19 原文

只要加入一行 css 样式就行了

html, body
{
  -ms-content-zooming:none;    
}
 
MSDN:https://msdn.microsoft.com/library/hh771891(v=vs.85).aspx
 
用 WebView.NavigateToString(string)的时候
外面包个 DIV  就可以了 
string = "<body style=\"-ms-content-zooming:none;\" >" + string + "</div>";

 

 

 

推荐阅读