【发布时间】:2017-03-22 18:38:55
【问题描述】:
我有一张卡片列表,我需要在小型设备的 1 列、中型设备的 2 列和大型设备的 3 列中显示它们
基于https://stackoverflow.com/a/36432126/2279488 和https://stackoverflow.com/a/36432126/2279488 我尝试了下面的代码,但最后没有成功。
1.
<ion-row responsive-sm>
<ion-col *ngFor="let card of cards" width-50>
<ion-card >
在小型设备上正确显示,在大型和中型设备上仅显示 2 张卡片
2.
<ion-row responsive-sm>
<ion-col width-50>
<ion-card *ngFor="let card of cards">
在小型设备上正确显示,在大型和中型设备上显示 1 列并且所有卡片都在列中
3.
<ion-row responsive-sm>
<ion-col>
<ion-card *ngFor="let card of cards">
在小型设备上正确显示,在中型和大型设备上仅显示 1 列,并且该列中显示卡片
【问题讨论】:
标签: ionic-framework responsive-design ionic2