Change default background color of md-slider of Angular Material

后端 未结 7 653
野的像风
野的像风 2021-02-04 20:06

I am using md-slider of Angular Material version 2.0.0-beta.8

I have selected the indigo-pink theme and imported it in

7条回答
  •  猫巷女王i
    2021-02-04 21:02

    Here is how I solved in just a few minutes and got it working.
    Add this two-line in style.css, not in component CSS.

    .mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
        background-color:#0056ff;//Your color
    }
    .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb {
        background-color: #0056ff;//Your color
    }
    

提交回复
热议问题