停用对网络视图本机的缩放? [英] Disable zoom on web-view react-native?
本文介绍了停用对网络视图本机的缩放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在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屋!
查看全文