【问题标题】:owl carousel 2 - Theme Stylesheet not workingowl carousel 2 - 主题样式表不起作用
【发布时间】:2016-02-01 18:17:06
【问题描述】:

我无法让 Owl Carousel Theme 样式表对我的滑块产生任何影响?

我使用的是最新版本的owl.carousel.2.0.0-beta.3

这是我的测试站点:example website

下面是owl carousel相关的HTML代码:

<div id="owl-single" class="owl-carousel col-xs-12 owl-loaded owl-drag">

  <div class="owl-stage-outer">

    <div class="owl-stage" style="transform: translate3d(-1396px, 0px, 0px); transition: 0s; width: 4886px;">

      <div class="owl-item cloned" style="width: 698px;">
        <div class="item">
          <img src="img/slide2.jpg" alt="GTA V">
        </div>
      </div>
      <div class="owl-item cloned" style="width: 698px;">
        <div class="item">
          <img src="img/slide3.jpg" alt="Mirror Edge">
        </div>
      </div>
      <div class="owl-item active" style="width: 698px;">
        <div class="item">
          <img src="img/slide1.jpg" alt="The Last of us">
        </div>
      </div>
      <div class="owl-item" style="width: 698px;">
        <div class="item">
          <img src="img/slide2.jpg" alt="GTA V">
        </div>
      </div>
      <div class="owl-item" style="width: 698px;">
        <div class="item">
          <img src="img/slide3.jpg" alt="Mirror Edge">
        </div>
      </div>
      <div class="owl-item cloned" style="width: 698px;">
        <div class="item">
          <img src="img/slide1.jpg" alt="The Last of us">
        </div>
      </div>
      <div class="owl-item cloned" style="width: 698px;">
        <div class="item">
          <img src="img/slide2.jpg" alt="GTA V">
        </div>
      </div>
    </div>
  </div>

  <div class="owl-nav">
    <div class="owl-prev">prev</div>
    <div class="owl-next">next</div>
  </div>

  <div class="owl-dots">
    <div class="owl-dot active"><span></span></div>
    <div class="owl-dot"><span></span></div>
    <div class="owl-dot"><span></span></div>
  </div>

</div>

名为“owl.theme.default.min.css”的样式表看起来包含所有导航样式表,但由于某种原因它没有设置 PREV 和 NEXT 按钮的样式?

任何帮助将不胜感激。

【问题讨论】:

  • 请显示您正在使用的代码。

标签: javascript css carousel stylesheet owl-carousel


【解决方案1】:

您在 html 声明中缺少与 owlcarousel 主题相关的课程 owl-theme:

<div id="owl-single" class="owl-carousel col-xs-12 owl-loaded owl-drag">

应该是:

<div id="owl-single" class="owl-carousel owl-theme col-xs-12 owl-loaded owl-drag">

我尝试将缺少的类直接添加到浏览器检查器中,现在您的页面如下所示:

【讨论】:

    猜你喜欢
    • 2016-10-01
    • 2016-02-14
    • 2022-01-01
    • 1970-01-01
    • 2016-02-14
    • 2019-10-05
    • 2021-12-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多