禁用缩放 web-view react-native?

新手上路,请多包涵

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 可以禁用缩放的标签。它必须同时适用于android和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>

原文由 Amal p 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.1k
2 个回答

认为这可能对其他人有帮助,我通过在 html <head> 部分添加以下内容来解决这个问题:

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

原文由 shahonseven 发布,翻译遵循 CC BY-SA 4.0 许可协议

试试 scalesPageToFit={false} 更多信息在 这里

原文由 Ismail Iqbal 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题