设置三个元素 水平排列 水平平均分布 竖直居中
import React, { Component } from 'react'
import { View } from 'react-native'
export default class App extends Component
{
render ()
{
return (
// 设置三个元素 水平排列 水平平均分布 竖直居中
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
<View style={{ width: 50, height: 50, backgroundColor: 'pink' }} />
<View style={{ width: 50, height: 50, backgroundColor: 'blue' }} />
<View style={{ width: 50, height: 50, backgroundColor: 'yellow' }} />
</View>
)
}
}