如何解决材料表头不粘
材料标题不粘。我也将容器添加到表和相应的属性中。但是表头不粘
请帮我解决这个问题
HTML
<div class="sample__content">
<mat-table
class="sample__content__table"
mat-table
[dataSource]="dataSource"
>
////columns an headers
<mat-header-row *matHeaderRowDef="testvalues; sticky: true"></mat-
header-row>
<mat-row *matRowDef="let row; columns: set values"></mat-row>
</div>
SCSS
<!-- language: scss -->
&__content {
height: $content-height;
max-height: $content-height;
width: 100%;
margin-left: $margin-left;
&__table {
overflow-x: auto;
max-height: 100%;
width: 100%;
.mat-footer-row,.mat-header-row,.mat-row {
display: table-row;
.mat-header-cell,.mat-cell {
display: table-cell;
vertical-align: middle;
white-space: nowrap;
padding-left: 2.5rem;
border-bottom: solid 1px $grey-20;
}
.mat-header-cell:first-of-type,.mat-cell:first-of-type {
padding-left: 0;
}
}}}
问题是这适用于 Mozilla,但不适用于 chrome
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。