2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-05-25 18:21:27 +08:00
|
|
|
order: 1
|
2017-09-27 22:32:49 +08:00
|
|
|
title:
|
2016-08-22 09:53:39 +08:00
|
|
|
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
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),高度分别为 `40px`、`32px` 和 `24px`。
|
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
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
There are three sizes of an Input box: `large` (40px)、`default` (32px) and `small` (24px).
|
2016-08-22 09:53:39 +08:00
|
|
|
|
|
|
|
Note: Inside of forms, only the large size is used.
|
|
|
|
|
2017-02-13 10:55:53 +08:00
|
|
|
````jsx
|
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
|
|
|
````
|