【问题标题】:Bootstrap grid offset自举网格偏移
【发布时间】:2014-10-22 19:10:02
【问题描述】:

我无法让我的引导英雄单位之一响应偏移命令:

<div class="col-xs-6-offset-3 col-md-6-offset-3 col-lg-6-offset-3">
    <div class="center hero-unit">
        <h1>text</h1>
    </div>
</div>

它出现并应用了 css,所以我知道 Bootstrap 正在工作。但它占据了整个 12 个网格。我怎样才能让它只占 6 并且居中?

【问题讨论】:

  • 例如尝试col-xs-6col-xs-offset-3
  • 请不要使用“bootstrap”作为标签,使用“twitter-bootstrap”,因为它们的含义不同

标签: css twitter-bootstrap grid scaffolding


【解决方案1】:

您使用了错误的类。首先设置列宽(或跨度,如果你喜欢用这些术语思考),然后应用偏移量。例如:

<div class="col-xs-2 col-xs-offset-3 
            col-md-6 col-md-offset-3 
            col-lg-6 col-lg-offset-3">
    <div class="center hero-unit">
        <h1>text</h1>
    </div>
</div>

【讨论】:

    猜你喜欢
    • 2021-05-02
    • 1970-01-01
    • 1970-01-01
    • 2017-08-30
    • 1970-01-01
    • 1970-01-01
    • 2014-09-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多