【问题标题】:Equal Image height within columns列内相等的图像高度
【发布时间】:2019-08-14 23:57:57
【问题描述】:

我正在尝试将一些图像放在两列中。 左栏中有一张图像,右栏中有两张图像。 右列中的两个图像应与左列中的图像具有相同的高度。我怎样才能做到这一点?

Screenshot

<div class="container">
    <div class="row">
      <div class="col-md-9">
        <img class="img-responsive" src="img/2.jpg" alt="">
      </div>
      <div class="col-md-3">
          <img class="img-responsive" src="img/4.jpg" alt="">

      </div>
      <div class="col-md-3">
          <img class="img-responsive" src="img/4.jpg" alt="">

      </div>
    </div>
</div>

.hero-header{
  position: relative;
}

.hero-headline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

【问题讨论】:

标签: html css twitter-bootstrap-3


【解决方案1】:

只需使用您已经创建的类 img-responsive 并设置 height:100% 或您正在寻找的任何数字。像这样,所有的图像肯定会有相同的高度。

【讨论】:

    猜你喜欢
    • 2018-11-08
    • 2019-12-21
    • 1970-01-01
    • 2016-03-03
    • 2014-01-13
    • 1970-01-01
    • 2022-01-10
    • 2021-09-26
    • 2023-03-16
    相关资源
    最近更新 更多