我试图让角材2卡工作使用灵活布局,以便浏览器调整大小的列数我渲染变化。我试图实现类似Google Keep的工作原理。角度材料2卡与灵活布局重叠海誓山盟
<div *ngIf="condition == true">
<div fxLayout="row" fxLayoutWrap="wrap" fxLayoutAlign="start start" fxLayoutGap="15px" >
<md-card fxFlex="calc(25%+15px)" *ngFor="let d of details">
<md-card-content>
Content
</md-card-content>
</md-card>
</div>
</div>
<button md-button (click)="condition = !condition">Toggle</button>
运行this plunker不过,你可以看到,当过一系列的角度材质卡需要包装,它们重叠一点点。
有谁知道我需要做什么用flex-layout来获得下一行在项目之间有一定的余量吗?它们具有fxLayoutGap
属性,但似乎只适用于与内容紧邻的对象之间的水槽,而不在下面或上面。