How to overwrite angular 2 material styles?

前端 未结 11 1006
南旧
南旧 2020-12-01 12:06

I have this select in angular material:

Its code :



        
11条回答
  •  一向
    一向 (楼主)
    2020-12-01 12:41

    I think classes should work, but you may need to use /deep/ because of the view encapsulation.

    Try this:

    /deep/ md-select.your-class {
      background-color: blue;
    }
    

    You can also play with theming.

提交回复
热议问题