显示选项时修改 matSelect 样式
当选项打开时如何更改 mat-select 的属性?
1 2 3 4 5 6 7 | <mat-select class = "selector" >
<mat-option><mat-option>
</mat-select>
.selector:focus {
color: green;
}
|
我尝试使用焦点,但效果不太好,可以单击垫选择而不打开选项。
解决方案:使用解决了问题
1 2 3 | .mat-select[aria-expanded= "true" ] {
color: green
}
|