【问题标题】:Bootstrap wrong alignment of itemsBootstrap错误的项目对齐方式
【发布时间】:2016-02-13 10:07:09
【问题描述】:

我是 bootstrap 新手,我使用 col-md-* 网格系统来制作项目列表。每个项目都类似于下图

JSFiddle中的源代码。

问题是当我减小浏览器窗口的大小时,红色矩形出现在错误的位置。我该如何解决?

【问题讨论】:

  • 使用媒体查询,你可以在W3Schools阅读它们

标签: css twitter-bootstrap-3 grid


【解决方案1】:

如果您希望某些东西正确但不完全正确,您应该使用引导程序grid off-sets.

第二 看看这个grid example,看看小窗口的大小调整为全宽。

引导程序在特定宽度下的响应能力也使col-md-6 100%

您似乎需要col-xs-6

我已经更新了小提琴here

http://jsfiddle.net/ZTgGX/2/

【讨论】:

  • 谢谢,我将 <div class="col-md-1"> 更改为 <div class="col-md-1 col-xs-2 pull-right" > 并且它有效。
  • <div class="col-md-1 col-xs-2 pull-right" <div class="col-xs-2 pull-right" col-xs-2 相同,覆盖 col-md-1
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-01-26
  • 1970-01-01
  • 1970-01-01
  • 2022-11-11
  • 1970-01-01
相关资源
最近更新 更多