【问题标题】:Using bootstrap how can I build this layout with the cards arranged one way on widescreens and another way on mobile?使用 bootstrap 我如何构建这种布局,卡片在宽屏上以一种方式排列,在移动设备上以另一种方式排列?
【发布时间】:2023-02-26 02:43:57
【问题描述】:

我使用的是 bootstrap 5.x,但我不太了解这种布局。有人可以建议一种实现此目的的方法,以便卡片在桌面/宽屏上像左图,在较小宽度的移动屏幕上像右图吗?

【问题讨论】:

    标签: css twitter-bootstrap bootstrap-5


    【解决方案1】:

    对于不同的像素布局,您可以从 bootstrap 获得一些帮助。 你需要定义一个父母并带孩子你需要多少, 然后将 parent 的类名设置为“row”。对于子 div,对于大型设备 => 类名将为 col-lg-6。对于小型设备设置类名 => col-lg-12。 enter image description here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-23
      • 1970-01-01
      • 2018-02-11
      • 2021-12-18
      • 1970-01-01
      • 2013-03-08
      • 1970-01-01
      相关资源
      最近更新 更多