【发布时间】:2019-07-04 16:20:07
【问题描述】:
我正在尝试提升 mat-table 中悬停的行,因此在悬停时将高度更改为 <tr>,但作为阴影效果的高度未显示在行的底部,但显示为顶部、左侧和右侧行。
.html
<div class="mat-elevation-z2" #TABLE>
<table mat-table [dataSource]="dataSource" matSort>
<!-- Required Columns... -->
<tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
<tr mat-row *matRowDef="let row; let e = index; columns: columnsToDisplay;"
(mouseover)="onMouseOver(e)" [ngClass] = "{'mat-elevation-z24' : e == mouseOverIndex}"></tr>
</table>
</div>
.ts
mouseOverIndex = -1;
public onMouseOver(index) {
this.mouseOverIndex = index;
}
.css
.mat-row:hover {
cursor: pointer;
}
我在这里错过了什么?
我尝试使用“z24”、“z16”、“z8”等,但没有用。
【问题讨论】:
-
行的底部是什么意思?
-
悬停
和悬停 + 1 的 之间的空格。我想显示好像悬停的 比剩余的 s. 稍微高一点
标签: css angular angular7 mat-table angular-material-7