【问题标题】:How can alter color of mat-label如何改变垫标签的颜色
【发布时间】:2021-04-11 21:01:22
【问题描述】:

我需要改变我的垫子标签的颜色。 但是当我尝试在 scss 中使用 !important 更改颜色时,我的输入出现错误......颜色不会恢复为红色。

如果我没有收到错误,我只需要更改标签的颜色,如果我收到错误,它应该留下红色。

<mat-form-field floatLabel="always" appearance="none">
  <mat-label>Usuário</mat-label>
  <input autofocus matInput formControlName="j_username">
</mat-form-field>

【问题讨论】:

    标签: html angular frontend


    【解决方案1】:

    只需在 scss 中更改您喜欢的颜色

    mat-label {
    color: red;
    }
    

    【讨论】:

      猜你喜欢
      • 2019-07-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-13
      • 2016-09-12
      • 2020-08-03
      相关资源
      最近更新 更多