Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何更改平面按钮的文本颜色?_Css_Reactjs_Meteor_Material Design - Fatal编程技术网

Css 如何更改平面按钮的文本颜色?

Css 如何更改平面按钮的文本颜色?,css,reactjs,meteor,material-design,Css,Reactjs,Meteor,Material Design,我正在使用react for cross platform应用程序开发meteor,并使用材料设计 我想更改平面按钮的文本颜色 我想使按钮的颜色与背景色#262d37和按钮的文本颜色白色相匹配 我可以更改背景颜色,但不能更改文本颜色 如果不使用平面按钮,如何解决此问题 < FlatButton backgroundColor="white" label="中" onClick={()=> this.changeToZh()}}/>

我正在使用react for cross platform应用程序开发meteor,并使用材料设计

我想更改平面按钮的文本颜色

我想使按钮的颜色与背景色#262d37和按钮的文本颜色白色相匹配

我可以更改背景颜色,但不能更改文本颜色

如果不使用平面按钮,如何解决此问题

< FlatButton backgroundColor="white" label="中" onClick={()=> this.changeToZh()}}/>      
this.changeToZh()}}/>
有一个属性
FlatButton
,使用该属性设置文本的
颜色

根据:

labelStyl:object{}->覆盖按钮的标签的内联样式 元素

像这样:

<FlatButton 
     label="中"  
     labelStyle={{color: 'red'}}            //here
     backgroundColor="white"
     onClick={()=> this.changeToZh()}}
/> 
this.changeToZh()}
/> 

所有这些都已在材料设计文档中明确提及