Angular 6 Material - Hues and How to change the color of mat radio button

后端 未结 5 2048
悲&欢浪女
悲&欢浪女 2021-01-11 14:47

How can I change the color of the using CSS?

Saw on another post that if I use the following code, it would change it, but I had no luck with it so far.



        
5条回答
  •  灰色年华
    2021-01-11 15:27

    add this css in your style.css/style.scss

    Stackblitz

    style.css/style.scss

    .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{
      border-color:rgb(66, 134, 244); 
    }
    
    .mat-radio-button.mat-accent .mat-radio-inner-circle{
      color:rgb(66, 134, 244);
      background-color:rgb(66, 134, 244) ;
    }
    
    .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
        background-color:rgb(255, 37, 37,.26);
    }
    

提交回复
热议问题