大佬教程收集整理的这篇文章主要介绍了如何在Angular Material中设置图标的颜色?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<mat-icon color="white">home</mat-icon>
然后,我也有:
<button mat-raised-button color="accent" type="submit" [disabled]="!recipientForm.form.valid"> <mat-icon color="white">save</mat-icon>SAVE </button>
>将主题设置为主要/重音的白色.
styles.scss:
@import '~@angular/material/theming'; @include mat-core(); $app-priMary: mat-palette($mat-whitE); $app-accent: mat-palette($mat-pink); $app-theme: mat-light-theme($app-priMary,$app-accent); @include angular-material-theme($app-themE);
>使用方法如下:
<mat-icon color="priMary">menu</mat-icon>
要么:
.white-icon { color: white; } /* Note: If you're using an SVG icon,you should make the class target the `<svg>` element */ .white-icon svg { fill: white; }
>将课程添加到您的图标:
<mat-icon class="white-icon">menu</mat-icon>
以上是大佬教程为你收集整理的如何在Angular Material中设置图标的颜色?全部内容,希望文章能够帮你解决如何在Angular Material中设置图标的颜色?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。