ant-design/spec/layout/demo/aside.md

70 lines
1.4 KiB
Markdown
Raw Normal View History

2015-11-09 18:05:23 +08:00
# 侧边导航
2015-11-09 19:40:35 +08:00
- order: 2
2015-11-09 18:05:23 +08:00
顶级导航在侧边栏。
---
````jsx
2015-11-09 19:40:35 +08:00
import { Menu, Breadcrumb } from 'antd';
2015-11-09 18:05:23 +08:00
ReactDOM.render(
2015-11-09 21:00:30 +08:00
<BrowserDemo>
<div className="ant-layout-aside">
<aside className="ant-layout-sider">
</aside>
<div className="ant-layout-main">
<div className="ant-layout-header"></div>
<div className="ant-layout-container">
<div className="ant-layout-breadcrumb">
<Breadcrumb>
<Breadcrumb.Item>首页</Breadcrumb.Item>
<Breadcrumb.Item>应用列表</Breadcrumb.Item>
<Breadcrumb.Item>某应用</Breadcrumb.Item>
</Breadcrumb>
</div>
<div className="ant-layout-content">
<div style={{ height: 290 }}></div>
</div>
2015-11-09 19:40:35 +08:00
</div>
</div>
</div>
2015-11-09 21:00:30 +08:00
</BrowserDemo>
2015-11-09 18:05:23 +08:00
, document.getElementById('spec-layout-demo-aside'));
````
````css
2015-11-09 19:40:35 +08:00
.ant-layout-aside {
background: #f4f4f4;
2015-11-09 21:00:30 +08:00
height: 100%;
2015-11-09 19:40:35 +08:00
}
.ant-layout-aside .ant-layout-sider {
width: 224px;
height: 100%;
position: absolute;
background: #373737;
}
.ant-layout-aside .ant-layout-header {
background: #fff;
height: 64px;
border-bottom: 1px solid #e9e9e9;
}
.ant-layout-aside .ant-layout-breadcrumb {
margin-top: 7px;
margin-bottom: -17px;
}
.ant-layout-aside .ant-layout-container {
margin: 0 16px 16px 240px;
}
.ant-layout-aside .ant-layout-content {
background: #fff;
margin-top: 24px;
2015-11-09 18:17:37 +08:00
}
````