Angular Material - 更改 md-select 焦点边框底部和选定的 md-option 颜色 [英] Angular Material - Change md-select focus border bottom and selected md-option color

查看:31
本文介绍了Angular Material - 更改 md-select 焦点边框底部和选定的 md-option 颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,angular material md-select 将聚焦的底部边框颜色和选定的 md-option 颜色更改为紫色,我尝试通过 css 更改这些但找不到正确的选择器.

By default angular material md-select changes the focused bottom border colour and selected md-option colour to purple, and I've tried changing these through css but can't find the right selectors.

我需要使用哪些选择器来更改这些?

Which selectors do I need to use to change these?

推荐答案

要在焦点或选择选项后更改边框底部颜色,请使用此

To change border-bottom color after focus or selecting option use this

md-select:not([disabled]):focus .md-select-value{
  border-bottom-color: #000;
}

如有必要,请使用 !important.希望它会有所帮助.

Use !important if necessary. Hope it will help.

这篇关于Angular Material - 更改 md-select 焦点边框底部和选定的 md-option 颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆