【问题标题】:Bootstrap grid not spreading throughout the whole screen width引导网格没有遍布整个屏幕宽度
【发布时间】:2019-11-10 14:41:59
【问题描述】:

我有以下 1 行 2 列的代码。然而,屏幕边缘有很多额外的空间。知道如何解决它吗?

<div class="container">
<div class="row">
    <div class="col col-md-3">
        <div class="card h-100">
            <p class="card-body">This card on the left of the other two cards, with a fixed height and scrolling.</p>
        </div>
    </div>
    <div class="col col-md-9">
        <div class="card">
            <p class="card-body">How do you want to ask the question?<p>
        </div>
        <div class="card">
            <p class="card-body">How should students ask the question?</p>
        </div>
    </div>
</div>

【问题讨论】:

    标签: html bootstrap-4


    【解决方案1】:

    只需删除带有类容器的 div。

    <div class="row">
    <div class="col col-md-3">
        <div class="card h-100">
            <p class="card-body">This card on the left of the other two cards, with a fixed height and scrolling.</p>
        </div>
    </div>
    <div class="col col-md-9">
        <div class="card">
            <p class="card-body">How do you want to ask the question?<p>
        </div>
        <div class="card">
            <p class="card-body">How should students ask the question?</p>
        </div>
    </div>
    

    【讨论】:

      猜你喜欢
      • 2017-02-19
      • 1970-01-01
      • 1970-01-01
      • 2015-07-18
      • 2020-11-29
      • 2021-04-05
      • 1970-01-01
      • 2019-08-06
      • 2012-07-29
      相关资源
      最近更新 更多