【问题标题】:how to make table header inside mat-sidenav-container sticky如何使 mat-sidenav-container 中的表头变粘
【发布时间】:2021-10-15 12:57:30
【问题描述】:

我在这里有一个解决方案,如何使角度表头变得粘稠: how to make angular table with sticky header stick to an offset

我的下一个问题是如何让它在 mat-sidenav-container 中粘住。将表格包裹在 mat-sidenav-container 内不起作用: https://stackblitz.com/edit/angular-h1utvg-zpqlsa?file=app%2Ftable-sticky-header-example.html

我可以看到 mat-sidenav-container 和 mat-sidenav 内容将位置设置为相对。我试过操纵位置属性无济于事。

【问题讨论】:

    标签: angular angular-material


    【解决方案1】:

    我认为你应该用一些container 包裹table 并为其设置一些max-height。见example

    【讨论】:

    • 那么有没有办法在不限制桌子高度的情况下做到这一点?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-19
    • 2019-03-14
    相关资源
    最近更新 更多