2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-04-10 15:38:52 +08:00
|
|
|
order: 3
|
2016-05-26 17:46:55 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 更灵活的内容展示
|
|
|
|
en-US: Customized content
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-02-20 16:40:18 +08:00
|
|
|
|
2016-05-26 17:46:55 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-02-20 16:40:18 +08:00
|
|
|
可以调整默认边距,设定宽度。
|
|
|
|
|
2016-05-26 17:46:55 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
Customizing default width and margin.
|
|
|
|
|
|
|
|
|
2016-02-20 16:40:18 +08:00
|
|
|
````jsx
|
|
|
|
import { Card } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Card style={{ width: 240 }} bodyStyle={{ padding: 0 }}>
|
|
|
|
<div className="custom-image">
|
2016-04-18 14:58:38 +08:00
|
|
|
<img alt="example" width="100%" src="https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png" />
|
2016-02-20 16:40:18 +08:00
|
|
|
</div>
|
|
|
|
<div className="custom-card">
|
2016-05-26 17:46:55 +08:00
|
|
|
<h3>Europe Street beat</h3>
|
2016-02-20 16:40:18 +08:00
|
|
|
<p>www.instagram.com</p>
|
|
|
|
</div>
|
|
|
|
</Card>
|
|
|
|
, mountNode);
|
|
|
|
````
|
|
|
|
|
|
|
|
````css
|
|
|
|
.custom-image img {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
.custom-card {
|
|
|
|
padding: 10px 16px;
|
|
|
|
}
|
|
|
|
.custom-card p {
|
|
|
|
color: #999;
|
|
|
|
}
|
|
|
|
````
|