el-form-item设置上下间距
时间: 2023-11-05 21:17:39 浏览: 456
el-select-tree:ElementUI的el-select与el-tree结合
5星 · 资源好评率100%
要设置el-form-item的上下间距,可以在CSS中使用margin属性进行设置。根据引用中的代码示例,可以使用以下CSS代码来将el-form-item的下边距设置为0px:
.el-form-item {
margin-bottom: 0px;
}
这样,el-form-item之间的间距就会被缩小为0,解决了表单组件之间的上下间距问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [修改ElementUI默认表单项el-form-item间距](https://blog.csdn.net/qq_35462323/article/details/123084943)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [插入表单form上下都会空出一行的解决方法](https://download.csdn.net/download/weixin_38556205/13681897)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [在el-form中添加 class=“edit-el-form“ 属性可以缩短el-dialog中的el-form的每一个el-form-item之间的...](https://blog.csdn.net/JCjunior/article/details/129579671)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文