改变同一行form之间的距离
时间: 2023-10-14 16:04:27 浏览: 92
可以使用CSS中的margin属性来改变同一行form之间的距离。例如,将左右两个form之间的距离改为20px:
```html
<div style="text-align: right;">
<form style="display:inline-block; float:left; margin-right:20px;" method="post" action="#">
<button class="information-btn" type="submit" id="all-btn">全部员工</button>
</form>
<form style="display:inline-block; float:left;" method="post" action="#">
<button class="information-btn" type="submit" id="new-btn">添加员工</button>
</form>
<form style="display:inline-block; float:right;" method="post" action="#">
<button class="information-btn1" type="submit" id="chaxun-btn">查询</button>
<input type="text" id="chaxun-text" name="chaxuntext" placeholder="请输入要查询的员工信息" value="">
</form>
</div>
```
其中,`margin-right:20px`表示设置右边的margin为20px。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)