【发布时间】:2020-07-21 17:11:00
【问题描述】:
我尝试在未选中时用background-color: gray 填充Angular Material Checkbox,在选中时填充background-color: red。
这是我尝试过的:
mat-checkbox:not(.mat-checkbox-checked) .mat-checkbox-layout .mat-checkbox-background {
background-color: #C3C3C3;
}
mat-checkbox.mat-checkbox-checked .mat-checkbox-layout .mat-checkbox-background {
background-color: red
}
这种方式的工作方式与我预期的一样,但是当我检查/取消检查时显示白色背景并且动画似乎效果不佳。
【问题讨论】:
标签: angular angular-material material-design angular-animations