我有accourdion面板,我想更改accourdion中的箭头颜色。
我在此CSS中编写了此代码,但它不起作用:
.mat-expansion-panel {
.mat-expansion-indicator {
.mat-expansion-indicator::after{
color:red !important;
border-color: rgb(0, 0, 0) !important;
}
}
}
如何更改箭头的颜色????
答案 0 :(得分:1)
您必须将:: ng-deep与材质类一起使用以覆盖默认样式。
:host ::ng-deep .mat-expansion-indicator::after {
color:red !important;
border-color: rgb(0, 0, 0) !important
}