相关疑难解决方法(0)

在聚焦时更改mat-select-arrow和mat-select-underline

到目前为止,我已经尝试了很多不同的东西,例如:

/deep/ .mat-select:focus .mat-select-trigger .mat-select-arrow {
    color: #63961C;
}

/deep/ .mat-select:focus .mat-select-trigger .mat-select-underline {
    background-color: #63961C;
}
Run Code Online (Sandbox Code Playgroud)

要么 :

/deep/ .mat-select.mat-focused .mat-select-trigger .mat-select-arrow {
    color: #63961C;
}

/deep/ .mat-select.mat-focused .mat-select-trigger .mat-select-underline {
    background-color: #63961C;
}
Run Code Online (Sandbox Code Playgroud)

更改选择旁边的小箭头和下划线.

例如,我做到了

/deep/ .mat-input-container.mat-focused .mat-input-underline {
    background-color: #63961C;
}
Run Code Online (Sandbox Code Playgroud)

对于输入的下划线,它工作正常(聚焦时变为绿色).(是/深/适用于这个项目,虽然如果我记得很清楚它现在已被弃用)

我设法"一直"改变它,但我想要的是,它只在焦点上绿色,如果没有聚焦则保持灰色.

angular-material2 angular

4
推荐指数
2
解决办法
1万
查看次数

标签 统计

angular ×1

angular-material2 ×1