html - 角材料表边框不是全长
问题描述
我试图创建一个漂亮的桌子。由于矩阵部分即将包含内容,我无法将其缩小到移动设备。所以我添加了溢出:自动以获得滚动条。
问题是水平线不会延伸到整个表格,它会在滚动后面的部分切断。
HTML
<ng-container matColumnDef="module">
<mat-header-cell *matHeaderCellDef [ngClass]="'smallCell'"> Module</mat-header-cell>
<mat-cell *matCellDef="let moduleData" [ngClass]="'smallCell'"> {{moduleData.module}} </mat-cell>
</ng-container>
<ng-container matColumnDef="specialisation">
<mat-header-cell *matHeaderCellDef [ngClass]="'smallCell'"> Spec</mat-header-cell>
<mat-cell *matCellDef="let moduleData" [ngClass]="'smallCell'">
<mat-list dense>
<mat-list-item *ngFor="let specialisation of moduleData.specialisation"> {{specialisation}}</mat-list-item>
</mat-list>
</mat-cell>
</ng-container>
<ng-container matColumnDef="period">
<mat-header-cell *matHeaderCellDef [ngClass]="'smallCell'"> Periode</mat-header-cell>
<mat-cell *matCellDef="let moduleData" [ngClass]="'smallCell'"> {{moduleData.period}} </mat-cell>
</ng-container>
<ng-container matColumnDef="matrix">
<mat-header-cell *matHeaderCellDef [ngClass]="'matrixCell'"> Matrix</mat-header-cell>
<mat-cell *matCellDef="let moduleData" [ngClass]="'matrixCell'"> {{moduleData.matrix}} </mat-cell>
</ng-container>
<ng-container matColumnDef="endRequirements">
<mat-header-cell *matHeaderCellDef [ngClass]="'requirmentCell'"> Eindeisen</mat-header-cell>
<mat-cell *matCellDef="let moduleData" [ngClass]="'requirmentCell'">
<mat-list>
<mat-list-item *ngFor="let requirement of moduleData.endRequirements"> {{requirement}}</mat-list-item>
</mat-list>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let moduleRowData; columns: displayedColumns;"></mat-row>
</mat-table>
CSS
.table-container{
height: calc(100vh - 114px);
overflow: auto;
}
.requirmentCell{
flex: 0 0 325px;
}
.matrixCell{
flex: 0 0 550px;
}
.smallCell{
flex: 0 0 110px;
}
编辑 进一步修补,它不仅仅是在那里被切断的边界。它的任何css,背景颜色和标题。
解决方案
推荐阅读
- mysql - 如何使用 .NET MySql 连接器在 mariadb 中使用 DELIMITER?
- android - 以编程方式启动运动场景
- react-native - 议程 - 动态更改所选日期
- outlook - PRSMTPADDRESS 网址暂时不可用
- intellij-idea - Intellij 的本地历史可以追溯到多远?
- visual-studio-code - 新的 VSCode 设置编辑器:在每次击键时调用 onDidChangeConfiguration
- javascript - 局部变量代替函数中的参数,更好地理解函数
- python - 如何知道多处理(Python 模块)中的池中有多少线程/工作者已经完成?
- ios - 在应用程序“准备好出售”后更改“此版本中的新增功能”
- c++ - Windows 上的端口 getrlimits/setrlimit