如何使用CSS调整Mat对话框的角度宽度?增加模态大小,大概在宽度上:70vw,并以像素为单位添加最小宽度。
.mat-dialog-container {
display: block;
padding: 24px;
border-radius: 4px;
box-sizing: border-box;
overflow: auto;
outline: 0;
width: 100%;
height: 100%;
min-height: inherit;
max-height: inherit;
}
您必须将重要添加到CSS:
.mat-dialog-container {
width: 300px !important;
}
这将从角度覆盖默认宽度!