离子2响应网格 [英] Ionic 2 responsive grid

查看:136
本文介绍了离子2响应网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Ionic 2中制作响应式网格? Ionic 1支持保留类,如 responsive-md responsive-sm ,这使得网格响应,但它们看起来似乎没有在Ionic 2工作。

How can I make a responsive grid in Ionic 2? Ionic 1 supported reserved classes like responsive-md or responsive-sm that made grids responsive, but they don't seem to work in Ionic 2.

在我的情况下,我有一个< ion-row> ,其中有三个<离子-COL> 。当显示宽度低于阈值时,我希望列相互下降。 Ionic 2可以做到这一点吗?

In my case I have an <ion-row> with three <ion-col>. I would like the columns to drop below each other when the display width drops below a threshold. Is it possible to do this with Ionic 2?

推荐答案

虽然它目前似乎没有出现在Ionic 2文档中, responsive-md < Ionic 1中的/ code>, responsive-sm (等)类现在成为Ionic 2中的个别属性。

Though it does not seem to appear in the Ionic 2 documentation currently, the responsive-md, responsive-sm (etc.) classes in Ionic 1 now become individual attributes in Ionic 2.

以下是一个示例:

  <ion-row responsive-sm>
    <ion-col width-10>This column will take 10% of space</ion-col>
  </ion-row>

这篇关于离子2响应网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆