刚开始我是用的/deep/,但是不知道为啥没有效果,以前都有效果的,后来又加了!import,也没啥用,然后上了百度看到了::v-deep,亲测有效。
// 添加颜色类
::v-deep 深度选择器
//修改每一个label文字以及边距
类名或者是id名::v-deep .el-radio__label{
color: #eee;
}
//修改选中label文字
类名或者是id名::v-deep .el-radio__input.is-checked + .el-radio__label {
color: #e5e5e5 !important;
}
//修改选中radio背景色、边框
类名或者是id名 ::v-deep .el-radio__input.is-checked .el-radio__inner {
background: #e5e5e5 !important;这里要加import
border-color: #e5e5e5 !important;
}
修改el-radio的默认字体以及背景
猜你喜欢
转载自blog.csdn.net/m0_45218136/article/details/126515242
今日推荐
周排行