默认情况下,z-index设置为1300
做类似的事情:
[class*='MuiModal-root'] {
z-index: 2000!important;
}
有效,但有更好的方法吗?
如果你没有一个Material-UI themes docs并覆盖z-index,那就创建一个主题:
export const theme = createMuiTheme({
overrides: {
MuiModal:{
root: {
zIndex: 2000,
}
}
}
});