Bootstrap 4-我不希望列具有相同的高度 [英] Bootstrap 4 - I don't want columns to have the same height

查看:52
本文介绍了Bootstrap 4-我不希望列具有相同的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此引导程序4示例中,两列具有相同的高度. 我不想这样. 有快速解决方案吗?

In this bootstrap 4 example the 2 columns have the same height. I do not want this. Is there a quick fix for this ?

    <div class="col-lg-3 card bg-faded">
      <h1><small>Some favorites</small></h1>
      <ul>
        <li>Celery root</li>
        <li>Spaghetti Squash</li>
        <li>Killer Mushrooms</li>
      </ul>
    </div>

    <div class="col-lg-9">
      <h1>Wild & Wicky Vegetables</h1>
      <p>Kale c.....t.</p>
    </div>
</div><!--row-->

推荐答案

是的,您可以在行上使用d-block,在列上使用float-left,使其可以使用Bootstrap 3.x方式使用浮动列flexbox ..

Yes, you can use d-block on the row, and float-left on the columns to make it work the Bootstrap 3.x way with floated columns instead of flexbox..

<div class="row d-block">
    <div class="col-lg-3 float-left">
        ..
    </div>
    <div class="col-lg-9 float-left">
        ..
    </div>
</div>

https://codeply.com/go/Ghhq1NbMDG

相关:
Bootstrap 4像Bootstrap 3那样的浮点样式可能吗?
Bootstrap 4中列之间的垂直空间为空

Related:
Bootstrap 4 Columns float style like Bootstrap 3 is it possible?
Empty vertical space between columns in Bootstrap 4

这篇关于Bootstrap 4-我不希望列具有相同的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆