[英]How to change mat-button font color
我有一个带有以下代码的按钮:
<button mat-button (click)="getStock()" >Go </button>
我在styles.css中为整个应用程序设置了背景色
html { background-color:#a9c5f2 };
与Mat按钮相对应的CSS组件代码
.mat-button {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: .375rem .75rem;
font-size: 1rem;
line-height: 1.5;
border-radius: .25rem;
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
background-color: #659bf2;
border-color: #659bf2;
height:100px;
width:300px;
white-space: normal;
color: black !important;
}
浏览器中的垫按钮中的文本为灰色。
我该如何解决?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.