如何自定义Angular Material的input / md-input-container组件? [英] How do I customize Angular Material's input/md-input-container component?
本文介绍了如何自定义Angular Material的input / md-input-container组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如标题中所述,
如何自定义这些元素?
看起来他们使用的透明背景在大多数背景调色板上很难查看
As stated in the title, how do I customize these elements? It seems they are using transparent background which is very difficult to view on most background palettes
推荐答案
添加一个空白css文件后面的angular-material.css和内部的空白css文件覆盖您要自定义的规则。
Add one blank css file after "angular-material.css" and inside that blank css file overwrite the rules you want to customize.
对于你面对的问题,我添加了以下规则my custom.css。
For the problem you are facing I added the following rules in my custom.css.
md-input-container.md-default-theme label,
md-input-container.md-default-theme .md-placeholder{
color:grey !important;
}
您可以更改 color
或 background-color
。
这篇关于如何自定义Angular Material的input / md-input-container组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文