You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

# 行内排列的表单
10 years ago
10 years ago
- order: 1
10 years ago
在**视口宽度大于等于 768px **时,你可以为 `<form>` 标签添加 `.ant-form-inline` 类可使其表现为 inline-block 级别的控件。
---
````html
<form class="ant-form-inline">
<div class="ant-form-item">
<label for="userName">账户:</label>
<input class="ant-input" type="text" id="userName" placeholder="请输入"/>
10 years ago
</div>
<div class="ant-form-item">
<label for="password">密码:</label>
9 years ago
<input class="ant-input" type="password" id="password" placeholder="请输入密码"/>
10 years ago
</div>
9 years ago
<input type="submit" class="ant-btn ant-btn-primary" value="登 录" />
10 years ago
</form>
<br />
<form class="ant-form-inline">
<div class="ant-form-item">
<input class="ant-input" type="text" id="userName" placeholder="请输入账户名"/>
</div>
<div class="ant-form-item">
9 years ago
<input class="ant-input" type="password" id="password" placeholder="请输入密码"/>
</div>
9 years ago
<div class="ant-checkbox-inline">
<label>
<input type="checkbox"> 记住我
</label>
</div>
9 years ago
<input type="submit" class="ant-btn ant-btn-primary" value="登 录" />
</form>
10 years ago
````