[英]Can I use webview as a screen background in react native? If yes, How?
I want to use a webview as a screen background in react native.我想在 React Native 中使用 webview 作为屏幕背景。 Help if this is possible.
如果可能,请提供帮助。 I have used container, content from nativebase.io
我使用了容器,内容来自 nativebase.io
<Container>
<Content>
<WebView
source={{uri: 'https://abc.xyz/'}}
style={{height:"100%", width:"100%"}}
/>
<Button title="button on top of webview" style={{position:"absolute",zIndex:-9999}}/>
</Content>
</Container>
Of course it's possible.当然有可能。 All you do is create a WebView set it to cover the full screen using absolute positioning then draw all your other elements over the top.
您所做的就是创建一个 WebView,将其设置为使用绝对定位覆盖全屏,然后在顶部绘制所有其他元素。 Set the z-index at like -9999.
将 z-index 设置为 -9999。
I won't help with the code but if you try and fail post your code and I can help :)我不会提供代码帮助,但如果您尝试失败,请发布您的代码,我可以提供帮助:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.