2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 10
|
2017-03-13 11:13:12 +08:00
|
|
|
title:
|
2016-08-23 14:15:34 +08:00
|
|
|
zh-CN: 卡片式页签容器
|
|
|
|
en-US: Container of card type Tab
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-08-23 14:15:34 +08:00
|
|
|
|
2016-08-03 10:39:20 +08:00
|
|
|
## zh-CN
|
2015-12-17 12:33:34 +08:00
|
|
|
|
2015-12-17 13:44:04 +08:00
|
|
|
用于容器顶部,需要一点额外的样式覆盖。
|
2015-12-17 12:33:34 +08:00
|
|
|
|
2016-08-03 10:39:20 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
Should be used at the top of container, needs to override styles.
|
|
|
|
|
2017-02-13 10:55:53 +08:00
|
|
|
````jsx
|
2015-12-17 12:33:34 +08:00
|
|
|
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">
|
2016-10-10 16:21:41 +08:00
|
|
|
<TabPane tab="Tab 1" key="1">Content of Tab Pane 1</TabPane>
|
|
|
|
<TabPane tab="Tab 2" key="2">Content of Tab Pane 2</TabPane>
|
|
|
|
<TabPane tab="Tab 3" key="3">Content of Tab Pane 3</TabPane>
|
2016-04-29 12:13:27 +08:00
|
|
|
</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 {
|
2017-03-13 11:13:12 +08:00
|
|
|
background: #ececec;
|
2015-12-17 12:33:34 +08:00
|
|
|
overflow: hidden;
|
|
|
|
padding: 24px;
|
|
|
|
}
|
|
|
|
|
2016-05-10 11:26:48 +08:00
|
|
|
.card-container > .ant-tabs-card > .ant-tabs-content {
|
2015-12-17 12:33:34 +08:00
|
|
|
height: 120px;
|
|
|
|
margin-top: -16px;
|
|
|
|
}
|
2016-04-06 11:49:02 +08:00
|
|
|
|
2016-09-18 10:12:21 +08:00
|
|
|
.card-container > .ant-tabs-card > .ant-tabs-content > .ant-tabs-tabpane {
|
|
|
|
background: #fff;
|
|
|
|
padding: 16px;
|
|
|
|
}
|
|
|
|
|
2016-06-17 15:45:48 +08:00
|
|
|
.card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab {
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
|
|
|
|
2016-05-10 11:26:48 +08:00
|
|
|
.card-container > .ant-tabs-card > .ant-tabs-bar .ant-tabs-tab-active {
|
2015-12-17 12:33:34 +08:00
|
|
|
border-color: #fff;
|
|
|
|
}
|
|
|
|
````
|