这可能是由于浏览器的样式设置导致的问题。尝试将以下CSS样式添加到全局样式中:
.mat-select-panel { position: fixed !important; }
如果上述代码不起作用,则尝试将以下CSS样式添加到主AppComponent组件中的样式:
::ng-deep .mat-select-panel { position: fixed !important; }
希望这能帮助你修复这个问题!
上一篇:AngularMaterialv14主题如何升级到v15?
下一篇:AngularMaterialv15更新-主题未应用于旧版按钮