【发布时间】:2017-10-05 00:06:12
【问题描述】:
在 React Native 中,我有这个 Image 标签:
<Image
style={imageStyle.content}
source={{uri: myImageUri}}
/>
具有这种样式的:
const imageStyle = StyleSheet.create({
content:{
flexDirection:'column',
alignItems:'flex-end',
justifyContent:'flex-end',
backgroundColor: '#7CFC00',//light green
width: '95%'
height: '75%',
resizeMode: 'contain'
}
});
生成此图像:
我希望照片出现在为Image 容器分配的空间的底部。
但是,我无法做到这一点。在样式中,我指定了alignItems:'flex-end' 和justifyContent:'flex-end',但都不起作用。
知道如何将图像推送到容器底部吗?
【问题讨论】:
-
试试 alignSelf: 'flex-end'
标签: css react-native