Bootstrap 4 Alpha-6卡片包装问题

时间:2017-06-10 10:35:51

标签: html5 twitter-bootstrap css3 bootstrap-4

我在Bootstrap 4 Alpha-6中使用卡片有一个小问题。当卡片缠绕时,因为屏幕不够宽,无法为卡座中的所有卡片腾出空间,所以卡片在下一行"下一行"没有左对齐但左边距很窄。

是否需要修复Aplha-6错误?如果有人有解决方案,请告诉我。提前谢谢。

enter image description here



.card {
    background: #fff;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.1);
}

[class*="row"] {
    margin-bottom: 1em;
    justify-content: center;
}

[class*="col-"] {
    background: #efefef;
    border: 1px solid #ddd;
    padding-top: .75rem;
    padding-bottom: .75rem;
    width: 100%;
}

<div class="container-fluid">
    <div class="row" style="margin: 10px">
        <div class="card-deck">
            <div class="card">
                <div class="card-block">
                    <h4 class="card-title">Card title</h4>
                    <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
                    <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                </div>
            </div>
            <div class="card">
                <div class="card-block">
                    <h4 class="card-title">Card title</h4>
                    <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
                    <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                </div>
            </div>
            <div class="card">
                <div class="card-block">
                    <h4 class="card-title">Card title</h4>
                    <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
                    <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                </div>
            </div>
            <div class="card">
                <div class="card-block">
                    <h4 class="card-title">Card title</h4>
                    <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
                    <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                </div>
            </div>
            <div class="card">
                <div class="card-block">
                    <h4 class="card-title">Card title</h4>
                    <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
                    <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
                </div>
            </div>
        </div>
    </div>
</div>
&#13;
&#13;
&#13;

0 个答案:

没有答案