0

我正在使用"@angular/material": "2.0.0-beta.2"版本。要显示瓷砖,我已在md-grid-list内使用md-card。我已将rowHeight属性添加到md-grid-list。即使已定义rowHeight,该行中的卡片高度也不相同。我需要使用md-card的哪一个属性才能使该排中的所有卡具有相同的高度?您md-card如何在Angular2中修复md-grid-list中md-card的高度?

<md-grid-list cols="4" rowHeight="250px" gutterSize="20px"> 
    <md-grid-tile *ngFor="let data of myData"> 
     <md-card [style.background]="'lightblue'">  
    <md-card-title></md-card-title> 
    <md-card-title></md-card-title> 
    <md-card-content> 
    <h2>  
    </h2> 
    </md-card-content> 
    </md-card> 
    </md-grid-tile> 
</md-grid-list> 

回答

1

100%minHeight属性,仅调整高度和设置minwidth也填补了md-grid-tile

像:

[style.minHeight]="'100%'" [style.minWidth]="'100%'" 

Plunker例如。

+0

非常感谢。它运作良好。 – Mythri

+0

@ user1731770:你可以接受这个答案。如果帮助你。 :) – anoop

相关问题