如何改变el-steps的颜色
时间: 2023-10-18 15:53:46 浏览: 285
EL-IOT-II实验箱使用说明书
要改变el-steps的颜色,你可以使用以下样式代码来修改默认样式:
```css
<style scoped>
::v-deep .el-step__head.is-process {
color: #1890ff !important; // 圆圈中数字颜色
border-color: #1890ff !important; // 圆圈边框颜色
}
::v-deep .el-step__title.is-process {
color: #1890ff !important; // 圆圈下的标题文本颜色
}
::v-deep .el-step__head.is-success {
color: rgb(52, 158, 250); // 圆圈中数字颜色
border-color: rgb(52, 158, 250); // 圆圈边框颜色
}
::v-deep .el-step__title.is-success {
font-weight: bold; // 圆圈下的标题文本加粗
color: rgb(52, 158, 250); // 圆圈下的标题文本颜色
}
::v-deep .el-step__description.is-success {
color: rgb(52, 158, 250); // 圆圈下的描述文本颜色
}
</style>
```
将以上样式代码添加到你的组件中,即可改变el-steps的颜色。请注意,这里使用了`::v-deep`选择器来穿透组件的样式作用域,以修改el-steps的样式。
#### 引用[.reference_title]
- *1* [自定义设置:el-steps当前激活步骤的显示颜色](https://blog.csdn.net/qq_38969618/article/details/127516974)[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^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [更改el-steps颜色样式](https://blog.csdn.net/shuttle33/article/details/117114848)[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^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [element-ui修改el-steps默认样式](https://blog.csdn.net/sinat_42888557/article/details/100119754)[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^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文