element-ui样式冲突
时间: 2023-08-28 12:21:11 浏览: 127
修改elementUI的样式
回答: 当使用element-ui时,如果在某个页面中想要覆盖它的样式,但又不能使用scoped,可以通过在父级元素上添加一个类来命名空间解决冲突。例如,在一个页面的样式中,可以这样写:
.aritle-page{
.el-tag {
margin-right: 0px;
}
}
这样就可以只覆盖当前页面的element样式,而不影响其他页面的样式。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [element-ui样式不能被修改?修改element样式问题](https://blog.csdn.net/dcxia89/article/details/80402490)[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 style="max-width: 33.333333333333336%"]
- *2* [Vue局部引入Element-UI,解决UI冲突](https://blog.csdn.net/weixin_55626351/article/details/120516232)[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 style="max-width: 33.333333333333336%"]
- *3* [完美解决Vue文本编辑器 vue-quill-editor 和 element-ui 样式冲突造成的小图标样式错乱](https://blog.csdn.net/qq_27295403/article/details/96482198)[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 style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文