How to place “mat-toolbar” on top of “mat-sidenav” Angular Material 5

后端 未结 5 488
鱼传尺愫
鱼传尺愫 2021-01-18 14:10

I\'m writing here since I have a question about Mat Toolbar and Mat-sidenav from Angular Material. I\'m trying to get the Sidenav to go under the toolbar and the toolbar alw

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 14:23

    .example-mat-toolbar {
        position: sticky;
        position: -webkit-sticky; /* For macOS/iOS Safari */
        top: 0; 
        z-index: 10;
    }
    .example-sidenav-container {
        position: relative;
        height: 100%;
        display: block;
        transform: inherit;
    }
    

提交回复
热议问题