问题
table-container to display records. I have a requirement, when table reaches to top of the screen it's header stick to top. Please guide me to implement this requirement.
For example see this link http://angular-data-grid.github.io/demo/fixed-header/angular-md-grid.html#!?page=1&itemsPerPage=75
Thank you, Java4you.
回答1:
Using the Angular Material table, adding the following to the .scss file for the containing component will now achieve this, but not in IE unfortunately:
.mat-header-row {
position: sticky;
position: -webkit-sticky;
top: 0;
background-color: inherit;
}
See this for discussion.
来源:https://stackoverflow.com/questions/46468665/sticky-header-md-table-container-angular-js-material-design