【发布时间】:2018-02-24 14:49:47
【问题描述】:
我对带有嵌套内容的Image 组件上的borderRadius 有疑问。我不明白为什么borderRadius: 15 不显示任何内容。
如果我删除嵌套的<Text> 行,边框半径可以正常工作。
return (
<View style={[styles.imageContainer, styles.margins]}>
<Image source={IMAGES.loginBackground} style={styles.image}>
<Text>Itinéraire</Text>
</Image>
</View>
)
const styles = StyleSheet.create({
imageContainer: {
backgroundColor: "#f0f",
height: 170,
},
image: {
borderRadius: 15,
position:'absolute',
left:0,
right:0,
top:0,
bottom:0,
padding: 10,
width: undefined,
height: undefined,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-end',
},
}
我做错了吗?
【问题讨论】:
标签: react-native jsx