react-native-flex-container

1.样式一:

export default class App extends Component<Props> {
 render() {
   return (
     <View style={style.container}>
       <View style={style.subBox}>
         <Text style={style.text}>subBox1</Text>
       </View>
       <View style={style.subBox}>
         <Text style={style.text}>subBox2</Text>
       </View>
       <View style={style.subBox}>
         <Text style={style.text}>subBox3</Text>
       </View>
     </View>
   );
 }
}
const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',//此处修改了
     backgroundColor:'skyblue',
     height:500
   },
   subBox:{
     backgroundColor:"red"
   }
 })

在这里插入图片描述
2.样式二:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'row', //此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
3.样式三:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'flex-start', //此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
4.样式四:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'flex-end', //此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
5.样式五:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'center', //此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
6.样式六:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'row',//此处修改了
     justifyContent:'center', 
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
7.样式七:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',//此处修改了
     justifyContent:'space-between', //此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
8.样式八:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'space-around', //此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
9.样式九:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'space-around', //此处修改了
     flexWrap:'wrap',//此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
10.样式十:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'space-around', 
     flexWrap:'wrap',
     alignItems:'strentch',//此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
11.样式十一:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'space-around', 
     flexWrap:'wrap',
     alignItems:'flex-start',//此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
12.样式十二:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'space-around', 
     flexWrap:'wrap',
     alignItems:'flex-end',//此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述
13.样式十三:

const style = StyleSheet.create({
   container:{
     display:'flex',
     flexDirection:'column',
     justifyContent:'space-around', 
     flexWrap:'wrap',
     alignItems:'center',//此处修改了
     backgroundColor:'skyblue',
     height:500
   }
 })

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值