我在Angular中有以下html我正在使用mat-grid-list来排列我的元素,我想在中间添加分隔符,问题是分隔符总是在任何mat-grid-tile出现之前被推到顶部:
<mat-grid-list rowHeight="40px" cols="8">
<mat-grid-tile colspan='1'>
<p>Edit title:</p>
</mat-grid-tile>
<mat-grid-tile colspan='7'>
<some-component></some-component>
</mat-grid-tile>
<mat-divider></mat-divider>
<mat-grid-tile colspan='1'>
<p>Edit title:</p>
</mat-grid-tile>
<mat-grid-tile colspan='7'>
<some-component></some-component>
</mat-grid-tile>
如果我这样说,它也不会起作用:
<mat-grid-tile colspan='8'>
<mat-divider></mat-divider>
</mat-grid-tile>有谁有主意吗?
发布于 2018-02-23 20:59:18
<mat-grid-tile colspan='8'>
<mat-divider style="width: 100%;"></mat-divider>
</mat-grid-tile>style="width: 100%;"修复了该问题
https://stackoverflow.com/questions/48932203
复制相似问题