如何更改禁用按钮的字体颜色?
我有:
<ion-col col-1><button class='buttoncell abc noactualbutton' ion-button [disabled]="true" [color]="white">{{row[8]}}</button></ion-col>
和 SCSS:
.noactualbutton[disabled]{
color: rgb(255, 255, 255) !important;
}
但是,它仍然“更白”了,但它仍然是灰色的……
最佳答案
当您禁用按钮时,不透明度会自动设置为 0.4。您可以将样式设置为禁用时的按钮,如下所示:
.noactualbutton:disabled, noactualbutton[disabled]{
color: white;
opacity: 1;
background: #b3b3b3;
}
关于ionic3 - 禁用按钮的 ionic 更改字体颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54035404/