停用对网络视图本机的缩放? [英] Disable zoom on web-view react-native?

查看:96
本文介绍了停用对网络视图本机的缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在react-native web-view上禁用缩放,是否有类似hasZoom={false}的属性(仅作为示例),可以包含在下面的web-view标记中以禁用缩放. 它必须同时在android和ios上运行.

How to disable zoom on react-native web-view,is there a property like hasZoom={false}(just an example) that can be included in the below web-view tag that can disable zooming. It has to be working on both android and ios.

<WebView
     ref={WEBVIEW_REF}
     source={{uri:Environment.LOGIN_URL}}
     ignoreSslError={true}
     onNavigationStateChange={this._onNavigationStateChange.bind(this)}
     onLoad={this.onLoad.bind(this)}
     onError={this.onError.bind(this)}
 ></WebView> 

推荐答案

我认为这可能会对其他人有所帮助,为此我在html <head>部分中添加了以下内容:

Thought this might help others, I solved this by adding the following in the html <head> section:

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0">

这篇关于停用对网络视图本机的缩放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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