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.
|
|
|
---
|
|
|
|
order: 1
|
|
|
|
title:
|
|
|
|
zh-CN: 上中下布局
|
|
|
|
en-US: Header-Content-Footer
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
最基本的『上-中-下』布局。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
The most basic "header-content-footer" layout.
|
|
|
|
|
|
|
|
````__react
|
|
|
|
import { Layout, Menu, Breadcrumb } from 'antd';
|
|
|
|
const { Header, Content, Footer } = Layout;
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Layout className="layout">
|
|
|
|
<Header>
|
|
|
|
<div className="logo" />
|
|
|
|
<Menu
|
|
|
|
theme="dark"
|
|
|
|
mode="horizontal"
|
|
|
|
defaultSelectedKeys={['2']}
|
|
|
|
style={{ lineHeight: '64px' }}
|
|
|
|
>
|
|
|
|
<Menu.Item key="1">nav 1</Menu.Item>
|
|
|
|
<Menu.Item key="2">nav 2</Menu.Item>
|
|
|
|
<Menu.Item key="3">nav 3</Menu.Item>
|
|
|
|
</Menu>
|
|
|
|
</Header>
|
|
|
|
<Content style={{ padding: '0 50px' }}>
|
|
|
|
<Breadcrumb style={{ margin: '12px 0' }}>
|
|
|
|
<Breadcrumb.Item>Home</Breadcrumb.Item>
|
|
|
|
<Breadcrumb.Item>List</Breadcrumb.Item>
|
|
|
|
<Breadcrumb.Item>App</Breadcrumb.Item>
|
|
|
|
</Breadcrumb>
|
|
|
|
<div style={{ background: '#fff', padding: 24, minHeight: 280 }}>Content</div>
|
|
|
|
</Content>
|
|
|
|
<Footer style={{ textAlign: 'center' }}>
|
|
|
|
Ant Design ©2016 Created by Ant UED
|
|
|
|
</Footer>
|
|
|
|
</Layout>
|
|
|
|
, mountNode);
|
|
|
|
````
|
|
|
|
|
|
|
|
````css
|
|
|
|
#components-layout-demo-top .logo {
|
|
|
|
width: 120px;
|
|
|
|
height: 31px;
|
|
|
|
background: #333;
|
|
|
|
border-radius: 6px;
|
|
|
|
margin: 16px 24px 16px 0;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
````
|