【发布时间】:2018-04-22 15:31:21
【问题描述】:
我一直在尝试将图像设置为 react 本机应用程序的背景,但没有成功。
这是我的图片标签。
<Image
source={require('../img/cat.jpg')}
style={styles.backgroundImage}
blurRadius={1} />
它应该包含子元素,应该呈现在顶部。
样式如下:
backgroundImage: {
flex: 1,
width: null,
height: null,
resizeMode: 'cover',
},
目前,子元素呈现在屏幕底部,在图像之后,而不是在其顶部。
我应该如何做到这一点?
【问题讨论】:
-
这篇中型帖子可能对您有帮助吗? medium.com/reactnative/…
标签: image react-native background render