Mat对话框打开后更改背景

This is my site before opening the dialog: enter image description here

And this after: enter image description here

这是我的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中未出现

评论