Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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 伪元素在材质UI makeStyles React.js中不起作用_Css_Reactjs_Sass_Material Ui_Root - Fatal编程技术网

Css 伪元素在材质UI makeStyles React.js中不起作用

Css 伪元素在材质UI makeStyles React.js中不起作用,css,reactjs,sass,material-ui,root,Css,Reactjs,Sass,Material Ui,Root,伪元素在材质UI makeStyles中不起作用 innerBox: { borderRadius: "10px", background: "#fff", boxShadow: "0px 1px 3px 0px rgba(0, 0, 0, 0.36)", maxHeight: "50px", "& ::before": { content: "anything" }

伪元素在材质UI makeStyles中不起作用

innerBox: {
        borderRadius: "10px",
        background: "#fff",
        boxShadow: "0px 1px 3px 0px rgba(0, 0, 0, 0.36)",
        maxHeight: "50px",
        "& ::before": {
            content: "anything"
        }
    }

这里的问题似乎是您的选择器,它不是正确的而不是
&::before
尝试
&:before

innerBox:{
边界半径:“10px”,
背景:“fff”,
boxShadow:“0px 1px 3px 0px rgba(0,0,0,0.36)”,
最大高度:“50px”,
“&:之前”:{
内容:“任何东西”
}
}

那么代码中还有其他错误,但是选择器工作,请检查它同时使用的沙盒
:before
:before
innerBox:{borderRadius:“10px”,background:#fff”,boxShadow:“0px 1px 3px 0px rgba(0,0,0,0.36)”,maxHeight:“50px”,“and:before:{content:“'''}它的工作,兄弟