修改el-input的高度
时间: 2023-11-06 17:56:12 浏览: 97
要修改`<el-input>`的高度,有多种方法可以实现。一种方法是在组件上添加类名,并通过该类名修改宽度和高度。例如,可以在`<el-input>`上添加一个名为`input-box`的类名,然后在样式表中使用`.input-box input`选择器来修改输入框的宽度和高度。另一种方法是使用`rows`属性来调整输入框的高度。如果要实现多行文本输入框,可以将`type`属性设置为`textarea`,并使用`:rows`属性来指定行数。例如,可以这样写`<el-input type="textarea" :rows="8" placeholder="请输入发送内容" v-model="msg"></el-input>`来设置输入框的高度为8行。无论使用哪种方法,都能够修改`<el-input>`的高度。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [el-input设置高度和宽度](https://blog.csdn.net/qq_34626094/article/details/122533444)[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^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* [ElementUI 中Select和Input组件修改宽、高](https://blog.csdn.net/wangxiaoxiaosen/article/details/106907580)[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^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [Element设置<el-input>的高度](https://blog.csdn.net/newbaby123/article/details/122214225)[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^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文