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

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

问题描述

默认情况下,有角材质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天全站免登陆