2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 10
|
|
|
|
title: 卡片式页签容器
|
|
|
|
---
|
2015-12-17 12:33:34 +08:00
|
|
|
|
2015-12-17 13:44:04 +08:00
|
|
|
用于容器顶部,需要一点额外的样式覆盖。
|
2015-12-17 12:33:34 +08:00
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { Tabs } from 'antd';
|
|
|
|
const TabPane = Tabs.TabPane;
|
|
|
|
|
|
|
|
ReactDOM.render(
|
2016-04-29 12:13:27 +08:00
|
|
|
<div className="card-container">
|
|
|
|
<Tabs type="card">
|
|
|
|
<TabPane tab="选项卡一" key="1">选项卡一内容</TabPane>
|
|
|
|
<TabPane tab="选项卡二" key="2">选项卡二内容</TabPane>
|
|
|
|
<TabPane tab="选项卡三" key="3">选项卡三内容</TabPane>
|
|
|
|
</Tabs>
|
|
|
|
</div>
|
|
|
|
, mountNode);
|
2015-12-17 12:33:34 +08:00
|
|
|
````
|
|
|
|
|
|
|
|
````css
|
2016-04-27 20:44:36 +08:00
|
|
|
#components-tabs-demo-card-top .code-box-demo {
|
2015-12-17 12:33:34 +08:00
|
|
|
background: #ECECEC;
|
|
|
|
overflow: hidden;
|
|
|
|
padding: 24px;
|
|
|
|
}
|
|
|
|
|
2015-12-17 12:39:26 +08:00
|
|
|
.card-container > .ant-tabs-card .ant-tabs-content {
|
2015-12-17 12:33:34 +08:00
|
|
|
background: #fff;
|
|
|
|
padding: 16px;
|
|
|
|
height: 120px;
|
|
|
|
margin-top: -16px;
|
|
|
|
}
|
2016-04-06 11:49:02 +08:00
|
|
|
|
|
|
|
.card-container > .ant-tabs-card .ant-tabs-bar,
|
2015-12-17 12:39:26 +08:00
|
|
|
.card-container > .ant-tabs-card .ant-tabs-tab-active {
|
2015-12-17 12:33:34 +08:00
|
|
|
border-color: #fff;
|
|
|
|
}
|
|
|
|
````
|