角垫桌滚动水平粘性标头
我们如何将水平滚动条添加到带有角桌粘结标头的垫子桌上?
#CSS代码
#table {
width: 100%;
}
#table tr.mat-row{
height: 40px;
}
#html代码
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我们如何将水平滚动条添加到带有角桌粘结标头的垫子桌上?
#CSS代码
#table {
width: 100%;
}
#table tr.mat-row{
height: 40px;
}
#html代码
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
请看一下这篇文章:带有粘贴桌标题和水平,垂直滚动条
您可以将宽度和高度设置为垫子包裹的Div容器包裹。在Stylesheet上,您可以应用类似的内容:
示例水平和垂直滚动:
要删除垂直滚动调整.example-container css类,例如
: https://stackblitz.com/edit/edit/angular-hdg9xh-3xyt8z?列-example.css
如果您想水平浏览数据,则希望第一列充当表标头。
示例
Please take a look at this post : Mat Table with sticky header and Horizontal ,vertical scroll bar
You can set the width and height to the div container wrap around the mat-table. On stylesheet, you can apply something like this:
Example with horizontal and vertical scroll: https://stackblitz.com/edit/angular-hdg9xh-uxkaeh
To remove vertical scroll adjust the .example-container css class to be
Example : https://stackblitz.com/edit/angular-hdg9xh-3xyt8z?file=src%2Fapp%2Ftable-sticky-columns-example.css
If you want to scroll through data just horizontally you would want the first column to act as the table header.
Example