我正在嘗試更改 mui v4 模態的背景顏色,并且我在背景頂部得到了一個灰色層,而不是確定,這是默認行為,但是如何洗掉陰影 div ,如果我洗掉它會有一個 div 給我干凈的顏色,但不知道如何定位我懷疑它的紙張,知道如何擺脫這種陰影或定位目標背景的顏色值嗎?
const useStyles = makeStyles((theme) => ({
backDrop: {
backgroundColor: 'red',
},
<Modal
className={classes.backDrop}
open={context.modal.bool}
aria-labelledby='modal-modal-title'
aria-describedby='modal-modal-description'
>
{modalsBody}
</Modal>

uj5u.com熱心網友回復:
所以查看模態的檔案,我們可以看到有一個 BackdropProps 屬性。此屬性使用樣式物件作為其值。
<Modal BackdropProps={{style: {backgroundColor: 'white'}}} />
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/416322.html
標籤:
