我在 Angular 4 中使用 flex 布局模块,我在桌面模式下并排尝试卡片布局需要显示,并且在移动模式下它应该是一比一,但它对我不起作用请建议正确的代码。
下面是我的代码:
<div fxLayout="row" fxLayout-gt-xs="column">
<mat-card fxflex fxflex-gt-xs="100" fxFlex="33.33%">
<h2>Card title #1</h2>
<mat-card-content>
<p>Some content</p>
</mat-card-content>
</mat-card>
<mat-card fxflex fxflex-gt-xs="100" fxFlex="33.33%">
<h2>Card title #2</h2>
<mat-card-content>
<p>Some content</p>
</mat-card-content>
</mat-card>
使用这个版本: @angular/flex-layout
:^2.0.0-beta.9