You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
1.7 KiB

---
order: 0
title:
zh-CN: 基本结构
en-US: Basic Structure
---
## zh-CN
典型的页面布局。
## en-US
Classic page layouts.
````jsx
import { Layout } from 'antd';
const { Header, Footer, Sider, Content } = Layout;
ReactDOM.render(
8 years ago
<div>
<Layout>
8 years ago
<Header>Header</Header>
<Content>Content</Content>
8 years ago
<Footer>Footer</Footer>
</Layout>
<Layout>
8 years ago
<Header>Header</Header>
<Layout>
<Sider>Sider</Sider>
<Content>Content</Content>
</Layout>
<Footer>Footer</Footer>
</Layout>
8 years ago
<Layout>
<Header>Header</Header>
8 years ago
<Layout>
<Content>Content</Content>
<Sider>Sider</Sider>
</Layout>
<Footer>Footer</Footer>
8 years ago
</Layout>
<Layout>
<Sider>Sider</Sider>
<Layout>
8 years ago
<Header>Header</Header>
<Content>Content</Content>
<Footer>Footer</Footer>
</Layout>
8 years ago
</Layout>
</div>,
mountNode);
````
<style>
#components-layout-demo-basic .code-box-demo {
text-align: center;
}
#components-layout-demo-basic .ant-layout-header,
#components-layout-demo-basic .ant-layout-footer {
background: #7dbcea;
color: #fff;
}
#components-layout-demo-basic .ant-layout-footer {
line-height: 1.5;
}
#components-layout-demo-basic .ant-layout-sider {
background: #3ba0e9;
color: #fff;
line-height: 120px;
}
#components-layout-demo-basic .ant-layout-content {
background: rgba(16, 142, 233, 1);
color: #fff;
min-height: 120px;
line-height: 120px;
}
#components-layout-demo-basic > .code-box-demo > div > .ant-layout {
margin-bottom: 48px;
}
#components-layout-demo-basic > .code-box-demo > div > .ant-layout:last-child {
margin: 0;
}
</style>