【问题标题】:Bootstarp 4 - grid system- fixed items in flex-boxBootstrap 4 - 网格系统 - 弹性盒中的固定项目
【发布时间】:2021-02-06 23:27:05
【问题描述】:

在中等大小和向上直到大屏幕第二个图像高度不等于其他图像 [在此处输入图片说明][1]

https://i.stack.imgur.com/Qcytg.png

<div class="container">
          <div class="row "> 
            <% campgrounds.forEach(function(campground){ %>
              <div class="col-sm text-center d-flex align-items-strech">
                      <div class="card">
                      <img class="card-img-top" src="<%=campground.image%>" alt="Card image cap">
                      <div class="card-body">
                        <h3 class="card-title"><%=campground.name%></h3>
                        <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> 
                        <a href="#" class="btn btn-primary">Go somewhere</a>
                       </div>
                    </div>
                  </div>
              <% }); %>
        </div>
 </div>

【问题讨论】:

  • 您能否发布所有相关的 HTML?

标签: bootstrap-4 flexbox row css-grid grid-system


【解决方案1】:

您可以将 align-self-end 类添加到该按钮以使其在底部对齐。

【讨论】:

    猜你喜欢
    • 2018-09-03
    • 2018-10-20
    • 1970-01-01
    • 2017-05-26
    • 1970-01-01
    • 2018-03-03
    • 2018-12-30
    • 1970-01-01
    • 2019-11-22
    相关资源
    最近更新 更多