Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.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
Reactjs 材料界面:如何增加MuiModal根z指数?_Reactjs_Material Ui - Fatal编程技术网

Reactjs 材料界面:如何增加MuiModal根z指数?

Reactjs 材料界面:如何增加MuiModal根z指数?,reactjs,material-ui,Reactjs,Material Ui,默认情况下,z索引设置为1300 做一些类似于: [class*='MuiModal-root'] { z-index: 2000!important; } 工作正常,但有更好的方法吗?如果没有主题,请创建一个主题,并覆盖z索引,如下所示: export const theme = createMuiTheme({ overrides: { MuiModal:{ root: { zIndex: 2000,

默认情况下,z索引设置为1300

做一些类似于:

[class*='MuiModal-root'] {
  z-index: 2000!important;
}

工作正常,但有更好的方法吗?

如果没有主题,请创建一个主题,并覆盖z索引,如下所示:

export const theme = createMuiTheme({
    overrides: {
        MuiModal:{
            root: {
                zIndex: 2000,
            }
        }
    }
});