【发布时间】:2019-04-13 03:00:54
【问题描述】:
- 我正在尝试覆盖材质 UI css。
- 我尝试将这两个词都大写,但它仅在选中和悬停时发生变化,
- 正常状态下也可以改吗
- 我已调试但无法解决问题。
- 你能告诉我如何解决它吗?
- 在下面提供我的代码 sn-p 和下面的沙箱。
https://codesandbox.io/s/2pomwq2z20
const styles = theme => ({
root: {
flexGrow: 1,
width: "100%",
backgroundColor: theme.palette.background.paper
},
tabsIndicator: {
backgroundColor: "red",
textTransform: "capitalize"
},
tabRoot: {
"&:hover": {
color: "red",
opacity: 1,
textTransform: "capitalize"
},
"&$tabSelected": {
color: "red",
fontWeight: theme.typography.fontWeightMedium,
textTransform: "capitalize"
},
"&:focus": {
color: "red",
textTransform: "capitalize"
}
},
tabSelected: {}
});
【问题讨论】:
-
你试过
tabRoot: { textTransform: "capitalize", ... }吗? -
@tholle 感谢您的回复...我已更新但仍然无法正常工作:(在此处提供更新的代码codesandbox.io/s/2pomwq2z20
标签: javascript html css reactjs material-ui