要为Angular mat-button-toggle添加聚焦的叠加色彩,可以通过CSS样式来实现。以下是一种解决方法:
Toggle
.custom-toggle.mat-button-toggle-checked.mat-accent .mat-button-toggle-label-content {
background-color: yellow; /* 设置聚焦时的背景颜色 */
color: black; /* 设置聚焦时的文本颜色 */
}
这将为具有"custom-toggle" class的mat-button-toggle添加聚焦时的叠加色彩。你可以根据需要调整背景颜色和文本颜色。
希望这可以帮助到你!