在我的Angular应用程序(使用Angular Material设计)中,我需要使用Material Table显示一些数据。
该表有一个粘性标题,几行和一个粘性页脚。
默认情况下,行的高度为62.5px,我想覆盖此值。
我怎样才能实现这一目标?
我试过覆盖tr / tr.mat-row / tr.mat-header-row等的css样式,但没有成功。我也尝试过使用:: ng-deep。
另外,我的粘性页脚行高48px,我没有设置!!有谁知道发生了什么?
我能够用:: ng-deep编辑页脚行css,我已经将font-weight设置为粗体,但是当我设置height属性时没有任何反应。
::ng-deep tr.mat-footer-row {
border: 1px solid #e7e7e7;
font-weight: bold;
}
谢谢!
尝试在styles.scss上添加它。
tr.mat-footer-row {
border: 1px solid #e7e7e7;
font-weight: bold;
height: #px !important;
}
您可以在tr.mat-footer-row
中指定表格页脚的高度。
tr.mat-footer-row {
height: 100px;
}
这是StackBlitz的例子https://stackblitz.com/angular/gjjjdpjqvvde?file=app%2Ftable-sticky-footer-example.css