在我的 Angular 应用程序(使用 Angular Material 设计)中,我需要使用 Material Table 显示一些数据。
该表有一个粘性页眉、几行和一个粘性页脚。
默认情况下,行的高度为 62.5px,我想覆盖这个值。
我怎样才能做到这一点?
我曾尝试覆盖 tr/tr.mat-row/tr.mat-header-row 等的 css 样式,但没有成功。我也尝试过使用::ng-deep 。
此外,我的粘性页脚行的高度为 48 像素,这是我没有设置的!!有谁知道发生了什么?
Table picture
我可以使用::ng-deep 编辑页脚行 css,我已将字体粗细设置为 粗体 ,但是当我设置高度属性时,什么也没有发生。
::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;
}
关于css - 如何更改 Angular Material 表行高?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55895247/