Angular Material2 theming - how to set app background?

后端 未结 10 1651
别那么骄傲
别那么骄傲 2020-12-04 14:24

I am building an angular2 app using angular material2. I am trying to set the background of my application \"the correct way\", but I can\'t figure out how.

I found

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 14:59

    There is also a mixing for colors like this:

    .your-class-here {
       background: mat-color($mat-grey, 700, 0.9);
    }
    

    When looking at angular material components you can assign a color like this.

    
    
    

    That will make your toolbar the color of your primary color.

    also make sure to look at _theming.scss file in angular material.

    so you can use those mixins to just pull a color from your palette.

提交回复
热议问题