【问题标题】:Bootstrap div resize classBootstrap div 调整大小类
【发布时间】:2018-12-24 11:03:15
【问题描述】:

我有 div:

<div class="col-md-2 col-sm-4 col-xs-12 postaviborder">

min-width 为 992px 且 max-width 为 1199px 我需要 div 具有类 col-sm-4。 缩小尺寸后,需要继续调整到xs-12

我希望有人能理解我。 这可能吗?

【问题讨论】:

  • 够了,深入检查css类。
  • 不够。调整大小必须是 col-md-2,然后是 col-sm-4,最后是 col-xs-12。问题是当分辨率 992px-1199px 我仍然有 col-md-2,但我需要 col-sm-4。
  • @AleksandarStojanovic 您希望 div 在屏幕变小时缩小尺寸?

标签: html twitter-bootstrap responsive-design


【解决方案1】:

我建议检查引导网格系统 - http://getbootstrap.com/css/#grid

如果我理解正确,您可以使用以下内容:

1)对于大屏幕(大型设备桌面 (≥1200px))- 您可以使用 col-lg-4 => 元素宽度将是 100% 的 1/3

2) 对于较小的尺寸 - 您可以使用 col-xs-12 => 元素宽度将为 100%

您还可以覆盖网格媒体查询(@screen-sm-min、@screen-md-min、@screen-lg-min)-http://getbootstrap.com/css/#grid-media-queries

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多