ant-design/components/input/demo/size.md

38 lines
791 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
2016-05-25 18:21:27 +08:00
order: 1
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
## 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
## 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-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">
<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>
, 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
}
````