2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-05-25 18:21:27 +08:00
|
|
|
order: 1
|
2016-08-22 09:53:39 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 三种大小
|
|
|
|
en-US: Three sizes of Input
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-10-29 08:41:51 +08:00
|
|
|
|
2016-08-22 09:53:39 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-05-25 18:21:27 +08:00
|
|
|
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),高度分别为 `32px`、`28px` 和 `22px`。
|
2015-10-29 08:41:51 +08:00
|
|
|
|
2016-05-25 18:21:27 +08:00
|
|
|
注意: 在表单里面,我们只使用大尺寸的输入框。
|
2015-10-29 08:41:51 +08:00
|
|
|
|
2016-08-22 09:53:39 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
There are three sizes of an Input box: `large` (32px)、`default` (28px) and `small` (22px).
|
|
|
|
|
|
|
|
Note: Inside of forms, only the large size is used.
|
|
|
|
|
2017-01-19 15:19:03 +08:00
|
|
|
````__react
|
2016-05-19 14:43:10 +08:00
|
|
|
import { Input } from 'antd';
|
2015-10-29 08:41:51 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
2016-05-19 14:43:10 +08:00
|
|
|
<div className="example-input">
|
2016-08-22 09:53:39 +08:00
|
|
|
<Input size="large" placeholder="large size" />
|
|
|
|
<Input placeholder="default size" />
|
|
|
|
<Input size="small" placeholder="small size" />
|
2016-05-19 14:43:10 +08:00
|
|
|
</div>
|
2015-12-29 12:08:58 +08:00
|
|
|
, mountNode);
|
2015-10-29 08:41:51 +08:00
|
|
|
````
|
2016-05-19 14:43:10 +08:00
|
|
|
|
|
|
|
````css
|
|
|
|
.example-input .ant-input {
|
2016-05-25 18:21:27 +08:00
|
|
|
width: 200px;
|
|
|
|
margin: 0 8px 8px 0;
|
2016-05-19 14:43:10 +08:00
|
|
|
}
|
2016-08-22 09:53:39 +08:00
|
|
|
````
|