首页 > 解决方案 > 如何使用 css 以角度调整垫子对话框宽度?

问题描述

如何使用 css 以角度调整垫子对话框宽度?可能在宽度附近增加模态大小: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;
}

标签: cssangularsasslessmat-dialog

解决方案


您必须在您的 CSS中添加重要内容:

.mat-dialog-container {
    width: 300px !important;
}

这会覆盖 angular 的默认宽度!


推荐阅读