我有以下帶有粘性標題的角度表的作業示例:
https://stackblitz.com/edit/angular-h1utvg?file=app/table-sticky-header-example.css
我的問題是:如何防止表格在滾動時一直上升到頂部,但在偏移處停止。我試過這樣的事情:
table {
width: 100%;
position: sticky;
top: 30px;
}
但這行不通。
uj5u.com熱心網友回復:
如果我正確理解你的問題 - 你可以覆寫類的top屬性.mat-table-sticky:
::ng-deep .mat-table-sticky {
top: 30px !important;
}
參見StackBlitz。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/314760.html
標籤:有角的
上一篇:角度路線未路由到組件
下一篇:帶有加載器邏輯的嵌套訂閱反模式
