且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

材质用户界面样式对话框/模态背景

更新时间:2023-10-03 12:52:40

您可以使用模式的BackdropProps属性:

You can use the BackdropProps property of the modal:

<Modal
          aria-labelledby="simple-modal-title"
          aria-describedby="simple-modal-description"
          open={this.state.open}
          onClose={this.handleClose}
          BackdropProps= {{
              classes: {
                  root: classes.backDrop
              }
          }}
        >

并在您的样式对象中:

...
backDrop: {
    background: 'rgba(255,255,255,0.2)',
  },