gpt4 book ai didi

Angular 2 Material : Sidenav how to remove backdrop

转载 作者:技术小花猫 更新时间:2023-10-29 11:18:44 29 4
gpt4 key购买 nike

所以我在 Material Design 中使用 Angular CLI。我正试图用 sidenav 摆脱背景,我认为它会像

.mat-sidenav-backdrop.mat-sidenav-shown{
background-color: transparent !important;
}

但是这没有任何影响。我试过不显示、隐藏可见性等。似乎背景的样式被内嵌到标签中,我本以为重要的会覆盖它。然而,这是行不通的......任何人有任何想法不涉及我在渲染期间通过 javascript 剥离背景标签/改变样式?

最佳答案

@Input() hasBackdrop: any - Whether the drawer container should have a backdrop while one of the sidenavs is open. If explicitly set to true, the backdrop will be enabled for drawers in the side mode as well.

(c) https://material.angular.io/components/sidenav/api

所以你应该在 mat-sidenav-container 上设置属性 [hasBackdrop]="false"

关于 Angular 2 Material : Sidenav how to remove backdrop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45847994/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com