【问题标题】:How to adjust mat dialog width in angular using css?如何使用 css 以角度调整垫子对话框宽度?
【发布时间】:2020-08-28 08:54:16
【问题描述】:

如何使用 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 angular sass less mat-dialog


    【解决方案1】:

    您必须将 important 添加到您的 CSS:

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

    这会覆盖 angular 的默认宽度!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-03-31
      • 1970-01-01
      • 2020-02-23
      • 1970-01-01
      • 2018-01-14
      • 1970-01-01
      相关资源
      最近更新 更多