Bootstrap 4转盘高度不匹配

时间:2019-05-24 11:50:03

标签: bootstrap-4

我正在尝试在我的网站上设置bootstrap 4轮播。 代码是

<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
  </ol>
  <div class="carousel-inner">
   {% for post in site.posts limit:1 %}
    <div class="carousel-item active">
    {% assign image = post.content | split:"!-- ![header](" %}
        {% assign html = image[1] | split:") -->" | first %}
        {% if html and html != "" %}
      <img class="d-block img-fluid w-100" src="{{ html }}" alt="First slide">
    {% endif %}
    </div>
    {% endfor %}
    {% for post in site.posts offset: 1 limit:2 %}
    <div class="carousel-item">
    {% assign image = post.content | split:"!-- ![header](" %}
        {% assign html = image[1] | split:") -->" | first %}
        {% if html and html != "" %}
      <img class="d-block img-fluid w-100" src="{{ html }}" alt="Second slide">
    {% endif %}
    </div>
   {% endfor %}
  </div>
  <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

我的网站是https://bpmottathai.gitlab.io/bismi/
尽管我添加了img-fluid

,但第二张和第三张幻灯片的高度与第一张幻灯片的高度不同

0 个答案:

没有答案