Ant Design React 组件如何水平对齐col内容?
How to align col content horizontally in Ant Design React components?
我需要将列内容水平居中对齐。我查看了 ant 文档,但无法提出解决方案。
我试过的是:
我通过向 Col 组件添加“type”和“align”属性解决了问题。
<Row>
<Col span={8} style={{backgroundColor:'red'}} type="flex" align="middle" >
Col
</Col>
<Col span={4} style={{backgroundColor:'blue'}}>
Col
</Col>
</Row>
我需要将列内容水平居中对齐。我查看了 ant 文档,但无法提出解决方案。
我试过的是:
我通过向 Col 组件添加“type”和“align”属性解决了问题。
<Row>
<Col span={8} style={{backgroundColor:'red'}} type="flex" align="middle" >
Col
</Col>
<Col span={4} style={{backgroundColor:'blue'}}>
Col
</Col>
</Row>