如何在md-select上更改标签颜色

时间:2016-08-25 10:28:05

标签: css angular-material

一直试图找出如何更改md-select框上标签的颜色,但似乎失败了。

对于其他标签,您可以执行以下操作:

md-input-container label {
  color: #999999;
  text-shadow: none;
}

但是在md-select中不起作用,我无法弄清楚原因。检查它被拾取的元素,我看不到任何其他应该改变它的CSS

这是md-select

的代码
        <md-input-container class="md-block">
            <label>Want to be early adoptor?</label>
            <md-select ng-model="testertype">
                <md-option ng-value="type" ng-repeat="type in types">{{ type.name }}</md-option>
            </md-select>
        </md-input-container>

1 个答案:

答案 0 :(得分:2)

以下是一种方法 - CodePen

enter image description here

CSS

md-select ._md-select-value._md-select-placeholder {
  color: red;
}

如果您检查元素,您将看到:

enter image description here

相关问题