我正在尝试定位MatSnackbar
模块,使其显示在页面顶部。
我已经尝试使用config
添加customclass
。下面是我的代码:
component.ts
let config = new MatSnackBarConfig();
config.duration = 50000;
config.panelClass = ['red-snackbar']
this.snackBar.open("Please fill all the details before proceeding.", null, config);
.css
.red-snackbar{
position: absolute !important;
top: 54px;
}
但它不起作用。是否可以重新定位MatSnackbar?
https://stackoverflow.com/questions/51937261
复制相似问题