Angular 6材质-色相和如何更改垫子单选按钮的颜色 [英] Angular 6 Material - Hues and How to change the color of mat radio button
本文介绍了Angular 6材质-色相和如何更改垫子单选按钮的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改使用CSS的颜色?
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.
.mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
background-color:rgb(255, 37, 37);
}
.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 {
background-color: rgb(66, 134, 244);
}
此外,我如何使用其余的色相?
Also, how could I use the rest of the color hues?
<mat-radio-button color="accent">Hello, World</mat-radio-button>
比方说,我想使用300或A100的重音颜色,我该怎么做呢?
Let's say that I want to use from the Accent color, the hue of 300 or A100, how would I go about to doing that?
我尝试使用accent-100
和accent hue-100
,但是它不起作用
I've tried using accent-100
and accent hue-100
but, it doesn't work
推荐答案
将此CSS添加到您的style.css/style.scss
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);
}
这篇关于Angular 6材质-色相和如何更改垫子单选按钮的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文