【发布时间】:2021-06-07 22:05:49
【问题描述】:
【问题讨论】:
标签: reactjs react-native react-native-stylesheet
【问题讨论】:
标签: reactjs react-native react-native-stylesheet
我想出了一种方法来使用 png 图像来做到这一点,你所要做的就是
<Image style={{ tintColor: "any color",}} />
【讨论】:
将其包裹在 View 中并添加背景颜色样式。
<View style={styles.imageContainer}>
{...image here}
</View>
和
const styles = StyleSheet.create({
imageContainer: {
backgroundColor: 'blue'
}
})
【讨论】: