粘式头md-table-container角js材质设计 [英] Sticky header md-table-container angular js material design

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

问题描述

表容器显示记录.我有一个要求,当表格到达屏幕顶部时,标题会一直保持顶部.请指导我实施此要求.

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

For example see this link 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;
}

请参见进行讨论.

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

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