首页 > 解决方案 > Mat Dialog在打开后改变它的背景

问题描述

这是我在打开对话框之前的网站: 在此处输入图像描述

而这之后: 在此处输入图像描述

这是我的styles.scss的相关内容:

html,
body {
  height: 100%;
  background: #303030;
  color: white;
}

这是我的项目主题:

@import '../../../node_modules/@angular/material/theming';

@include mat-core();

$theme-primary: mat-palette($mat-grey, 900);
$theme-accent: mat-palette($mat-grey, 50);
$theme-warn: mat-palette($mat-red);

$theme: mat-dark-theme($theme-primary, $theme-accent, $theme-warn);

@include angular-material-theme($theme);

仅在向下滚动一点时才会出现问题。在页面顶部,我有一个 mat-tab-nav-bar。

更新:Chrome 中出现错误但 Safari 中没有

标签: angularangular-materialmat-dialog

解决方案


推荐阅读