mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 07:39:36 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
1.4 KiB
1.4 KiB
order | title | ||||
---|---|---|---|---|---|
3 |
|
zh-CN
设置对齐模式。
en-US
Config item align.
import { Space, Button } from 'antd';
export default () => (
<div className="space-align-container">
<div className="space-align-block">
<Space align="center">
center
<Button type="primary">Primary</Button>
<span className="mock-block">Block</span>
</Space>
</div>
<div className="space-align-block">
<Space align="start">
start
<Button type="primary">Primary</Button>
<span className="mock-block">Block</span>
</Space>
</div>
<div className="space-align-block">
<Space align="end">
end
<Button type="primary">Primary</Button>
<span className="mock-block">Block</span>
</Space>
</div>
<div className="space-align-block">
<Space align="baseline">
baseline
<Button type="primary">Primary</Button>
<span className="mock-block">Block</span>
</Space>
</div>
</div>
);
.space-align-container {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.space-align-block {
flex: none;
margin: 8px 4px;
padding: 4px;
border: 1px solid #40a9ff;
}
.space-align-block .mock-block {
display: inline-block;
padding: 32px 8px 16px;
background: rgba(150, 150, 150, 0.2);
}