在手机上全屏显示时,Angular MatSnackBar中面临的问题

时间:2019-03-19 06:19:07

标签: angular angular-material angular5 angular-ui angular-material2

我正在使用Angular材质处理Angular 7:

  • 我在我的应用程序中使用 MatDialog MatSnackBar
  • 我想为移动设备响应物质对话,因为我为@media only screen and (max-width:576px){编写了媒体查询:

CSS:

<style> 
.cdk-overlay-container .cdk-overlay-pane {
        max-width: 100vw !important;
        width: 100% !important;
        height: 100% !important;
}

.cdk-overlay-container .mat-dialog-content {
        max-height: 100vh !important;
}

.mat-dialog-title {
        button {
            line-height: 28px;
            font-size: 0.7em;
            margin-right: 15px;
            margin-top: -27px;
        }
}
</style>

但是在MatSnackBar中有冲突,这导致我的吐司在手机屏幕上全屏显示,并且(max-width:576px)

0 个答案:

没有答案