【问题标题】:Bootstrap responsive column layout stacking columnsBootstrap 响应式列布局堆叠列
【发布时间】:2016-03-18 02:35:51
【问题描述】:

我正在构建一个网格结构,并且我已将引导容器类更改为工作正常的新维度。我目前正在尝试实现下面的布局并且已经做到了这一点。每列都有一个背景图像。我正在尝试将另一个 col-md-3 放在黑色部分,但没有运气。有什么建议吗?

我的 HTML

<div class="container">
    <div class="row">
        <div class="col-sm-6 col-sx-6 col-md-3 col-lg-3 boats-row">
        </div>
        <div class="col-md-3 home-row-red">
        </div>
        <div class="col-md-6 col-sm-12 home-row-big">
        </div>
    </div>
</div>

CSS

.boats-row {
    max-height: 720px;
    height: 100%;
    height: 720px;
    background: url(img/boats.png);
    background-size: cover;
}

.home-row-red {
    height: 360px;
    background: red;
    max-height: 360px;
}

.home-row-big {
    height: 720px;
    max-height: 720px;
    background: url(img/panel-large.png);
    background-size: cover;
}

【问题讨论】:

    标签: html twitter-bootstrap css twitter-bootstrap-3 responsive-design


    【解决方案1】:

    还有这样的事情吗?

    <div class="row">
    
        <div class="col-sm-12 col-md-6">
            <div class="col-sx-6 col-sm-6 col-md-6  boats-row   ">
    
            </div>
    
            <div class="col-sx-6 col-sm-6 col-md-6 home-row-red">
    
            </div>
    
            <div class="col-sx-6 col-sm-6 col-md-6 home-row-blue">
    
            </div>
        </div>
    
        <div class="col-md-6 col-sm-12 home-row-big">
    
        </div>
    
    </div>
    

    【讨论】:

    • 那是正确的 :) 谢谢你 我想我已经看了太久了。非常感谢
    猜你喜欢
    • 2012-10-02
    • 2020-02-09
    • 2016-05-28
    • 1970-01-01
    • 2015-03-30
    • 1970-01-01
    • 2018-08-19
    • 2019-08-11
    • 1970-01-01
    相关资源
    最近更新 更多