作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我实现了一个 progress stepper来自 Material UI,但我找不到将其背景颜色从紫色更改为蓝色的方法。
在 documentation 之后我试图通过在 styles
上设置 progress
属性来更改它,但它应用了新的背景颜色而不是更改进度条的颜色...
const styles = {
progress: {
backgroundColor: 'blue',
}
};
<MobileStepper
variant="progress"
steps={3}
position="static"
activeStep={this.state.activeStep}
className={classes.progress}
nextButton={
<Button size="small" onClick={this.handleNext} disabled={this.state.activeStep === 2}>
Next
{theme.direction === 'rtl' ? <KeyboardArrowLeft /> : <KeyboardArrowRight />}
</Button>
}
backButton={
<Button size="small" onClick={this.handleBack} disabled={this.state.activeStep === 0}>
{theme.direction === 'rtl' ? <KeyboardArrowRight /> : <KeyboardArrowLeft />}
Back
</Button>
}
/>
最佳答案
您是否尝试过设置 color 属性而不是 backgroundColor?
const styles = {
progress: {
color: 'blue',
}
};
关于reactjs - 更改 React Material UI 上的 MobileStepper 颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52833403/
我实现了一个 progress stepper来自 Material UI,但我找不到将其背景颜色从紫色更改为蓝色的方法。 在 documentation 之后我试图通过在 styles 上设置 pr
我是一名优秀的程序员,十分优秀!