设置材料的网格列表的宽度

问题描述 投票:0回答:1

我有一列由3行组成,每行的高度为200px。

<mat-grid-list cols="1" rowHeight="200px">

  <mat-grid-tile rowspan="1" style="background-color: lightblue">
    FIRST
  </mat-grid-tile>
  <mat-grid-tile rowspan="1" style="background-color: #EDC2EC;">
    <mat-card-content style="text-align: center;">
      <p style="font-size: xx-large;">ALWAYS FREE</p>
      <p style="font-size: large;">Great for occasional use</p>
    </mat-card-content>
  </mat-grid-tile>
  <mat-grid-tile rowspan="1" [style.background]="lightpink">
    third
  </mat-grid-tile>

</mat-grid-list>

但是如何为我的行设置宽度?

angular grid material
1个回答
0
投票

一起使用cols和colspan属性,以行方式实现类似于网格的布局。

© www.soinside.com 2019 - 2024. All rights reserved.