简体   繁体   English

带有侧面导航的“角度材质”选项卡不起作用

[英]Angular Material Tabs with side Navigation does not work

Angular Material on the content messes up the side bar navigation in Angular Material. 内容上的Angular Material弄乱了Angular Material中的侧栏导航。 When we open the side navigation, the tab content shows up on the side navigation as though the side nav is transparent. 当我们打开侧面导航时,选项卡内容显示在侧面导航上,就像侧面导航是透明的一样。

<mat-tab-group>
        <mat-tab label="Applicant Details">

I was checking for different CSS options around the position, but no luck so far. 我正在检查该位置周围的其他CSS选项,但到目前为止还没有运气。 If I remove the tab group, the application looks okay. 如果删除选项卡组,该应用程序看起来还可以。

Had this same issue, just forcing z-index to 0 was not working in scss, it kept getting overridden somewhere, so the only thing that worked for me was using jquery to force the z-index value in onNgInit(). 遇到同样的问题,只是将z-index强制为0在scss中不起作用,它一直在某个地方被覆盖,所以对我唯一有效的方法是使用jquery强制onNgInit()中的z-index值。

 ngOnInit() { $('.mat-tab-header').css("z-index", 0); $('.mat-tab-body-wrapper').css("z-index", 0); } 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM