el-dialog背景色设置
时间: 2023-08-22 09:12:25 浏览: 254
el-dialog的背景色可以通过修改.el-dialog__wrapper和.el-dialog__body的样式来实现。可以使用以下代码来修改el-dialog的背景色:
.dialog-wrapper {
/deep/ .el-dialog__wrapper {
.el-dialog {
.el-dialog__body {
background: red;
padding: 0px;
}
.el-dialog__header {
padding: 0px;
}
}
}
}
这样就可以将el-dialog的背景色设置为红色。请注意,这段代码应该放在全局样式中,而不是在scoped样式中,以避免影响其他dialog的样式。\[2\]
#### 引用[.reference_title]
- *1* [element的dialog弹框的背景色](https://blog.csdn.net/m0_47265814/article/details/108094388)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [element 修改dialog的背景颜色](https://blog.csdn.net/weixin_41472431/article/details/107138007)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文