【发布时间】:2020-04-08 19:41:07
【问题描述】:
当我将鼠标移到 mat-form-field 上时,我遇到了 CSS 问题。
为了能够使用彩色垫卡,我在 style.scss 中添加了一些 CSS 类来更改 mat-form-field 的 background-color。
.mat-form-field-appearance-outline .mat-form-field-outline-start { background-color: white!important; }
.mat-form-field-appearance-outline .mat-form-field-outline-gap { background-color: white!important; }
.mat-form-field-appearance-outline .mat-form-field-outline-end { background-color: white!important; }
mat-form-field mat-label { background-color: rgba(255, 255, 255, 0.9); }
它工作正常,但是当我将鼠标悬停在mat-form-field 上时,
背景在几分之一秒内变为红色。
不幸的是,我找不到允许我删除这种透明度的 CSS 类。
StackBlitz: here
【问题讨论】:
标签: css angular angular-material angular-material2 mat-form-field