粘性标题 md-table-container angular js 材料设计 [英] Sticky header md-table-container angular js material design

查看:28
本文介绍了粘性标题 md-table-container angular js 材料设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

table-container 来显示记录.我有一个要求,当桌子到达屏幕顶部时,它的标题会粘在顶部.请指导我实施此要求.

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.

例如看这个链接http://angular-data-grid.github.io/demo/fixed-header/angular-md-grid.html#!?page=1&itemsPerPage=75

谢谢,Java4you.

Thank you, Java4you.

推荐答案

使用 Angular Material 表,将以下内容添加到包含组件的 .scss 文件中现在可以实现这一点,但不幸的是在 IE 中不会:

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;
}

有关讨论,请参阅this.

这篇关于粘性标题 md-table-container angular js 材料设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆