Jquery 引导转盘控件在将z索引设置为-1时无法单击

Jquery 引导转盘控件在将z索引设置为-1时无法单击,jquery,css,twitter-bootstrap,twitter-bootstrap-3,Jquery,Css,Twitter Bootstrap,Twitter Bootstrap 3,当我必须将z索引设置为-1时,您能看一下并让我知道如何启用引导转盘的ht e控制吗 #test{z-index:-1;} .box1{height:500px; background-color:red;} .box2{height:500px; background-color:blue;} <section class="navbar-fixed-top" id="test"> <div class="row"> <div class="container

当我必须将z索引设置为-1时,您能看一下并让我知道如何启用引导转盘的ht e控制吗

#test{z-index:-1;}
.box1{height:500px; background-color:red;}
.box2{height:500px; background-color:blue;}

<section class="navbar-fixed-top" id="test">
<div class="row">
  <div class="container">
  <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>

  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="http://cdn.elegantthemes.com/blog/wp-content/uploads/2013/09/bg-1-full.jpg" alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>
    <div class="item">
      <img src="http://cdn.elegantthemes.com/blog/wp-content/uploads/2013/09/bg-2-full.jpg" alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>

  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

  </div>
  </div>
  </section>
<section>
<div class="row">
  <div class="container">
  <div class="box1"></div>
  </div>
  </div>
  </section>
<section>
<div class="row">
  <div class="container">
  <div class="box2"></div>
  </div>
  </div>
  </section>
sectiontest设置为position:fixed,这意味着它不仅保持在相同的位置,而且不占用任何空间。这就是为什么下一节与sectiontest位于相同位置的原因。现在,由于您将sectiontest设置为z-index:-1,所以另一个部分位于sectiontest前面。因此,无法单击控件

解决方案是从sectiontest中删除位置:固定。在您的情况下,最好的做法是简单地从sectiontest中删除类navbar fixed top。此外,您应该禁用脚本,以便各部分彼此相邻


谢谢Simon,但正如我所说的,我需要修正部分测试。你在帖子中没有这样说,但我可以帮你。你为什么需要修理它?你的目标是什么?我想得到的是这样的东西,但我有一个引导滑块,正如你看到的,滑块和布局工作正常,但滑块控件不工作!这里发布了一个类似的问题: