我正在寻找一种解决方案来编辑我的素材形式。我想改变背景和边框。
我尝试直接在CSS中更改:
input { background:#999; }
但它改变了所有div的背景(https://www.awesomescreenshot.com/showImage?img_id=3537926)
我正在使用Redux Form with Material UI:https://redux-form.com/7.4.2/examples/material-ui/
material-ui方式 - 在你的jsx文件中使用表单,你可以定义一个包含classNames的主题
import classNames from "classnames";
....
const styles = theme => ({
form_input: {
background: "#999"
},
....
然后,在您的表单或封闭的div标签中,包含类似......
className={classes.form_input}