引导轮播下一个按钮滚动到顶部

时间:2018-07-19 18:19:01

标签: bootstrap-4

在我的网站中,当我单击轮播中的“下一步”或“上一步”按钮时,它会滚动到页面顶部。我正在尝试在代码中查找错误,...但是无法访问https://www.hellomiz.com并让我知道问题所在。

这是我的轮播代码

<div id="mainSlider" class="carousel slide" data-ride="carousel">
    <ol class="carousel-indicators">
      <li data-target="#mainSlider" data-slide-to="0" class="active"></li>
      <li data-target="#mainSlider" data-slide-to="1"></li>
      <li data-target="#mainSlider" data-slide-to="2"></li>
    </ol>
    <div class="carousel-inner">
    {% assign slider_image_size = '3840x1320' %}
      <div class="carousel-item active">
        <img class="d-block w-100" src="{{ section.settings.slide-image-1 | img_url: slider_image_size }}" alt="Maternity Clothes">
      </div>
      <div class="carousel-item">
        <img class="d-block w-100" src="{{ section.settings.slide-image-2 | img_url: slider_image_size }}" alt="Maternity Dresses">
      </div>
      <div class="carousel-item">
        <img class="d-block w-100" src="{{ section.settings.slide-image-3 | img_url: slider_image_size }}" alt="Pregnancy Dresses">
      </div>
    </div>
    <a class="carousel-control-prev" href="#mainSlider" 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="#mainSlider" role="button" data-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>

谢谢

0 个答案:

没有答案