Reactjs 在react native中浮动右元素
如何将红色背景切换为绿色 我的代码是:Reactjs 在react native中浮动右元素,reactjs,react-native,Reactjs,React Native,如何将红色背景切换为绿色 我的代码是: <View style={{flexDirection:'row', justifyContent: 'flex-end', alignItems: 'flex-end'}}> <View style={{backgroundColor:'red', flex: 1, justifyContent: 'flex-end'}}> <Text>1</Text>
<View style={{flexDirection:'row', justifyContent: 'flex-end', alignItems: 'flex-end'}}>
<View style={{backgroundColor:'red', flex: 1, justifyContent: 'flex-end'}}>
<Text>1</Text>
</View>
<View style={{backgroundColor:'blue', flex: 1}}>
<Text>2</Text>
</View>
<View style={{backgroundColor:'green', flex: 1}}>
<Text>3</Text>
</View>
</View>
</View>
1.
2.
3.
如何通过更改样式来解决问题?
请帮助尝试使用一些东西作为标志来更改视图的样式尝试
行反转
以flexDirection
@Dan谢谢,它可以工作