twitter-bootstrap – Accordion Inside Accordion twitter bootstrap?

前端之家收集整理的这篇文章主要介绍了twitter-bootstrap – Accordion Inside Accordion twitter bootstrap?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用Twitter Bootstrap在另一支手风琴中实现手风琴。可能吗?如果是这样,那么请帮助我代码,因为我尝试实施它但我没有成功。

解决方法

简单地在div中包含另一个手风琴 – 手风琴 – 内部:
<div class="accordion" id="accordion1">
  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapSEOne">
      Collapsible Group #1
      </a>
    </div>
    <div id="collapSEOne" class="accordion-body collapse in">
      <div class="accordion-inner">
        This is a simple accordion inner content...
      </div>
    </div>
  </div>
  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseTwo">
        Collapsible Group #2 (With nested accordion inside)
      </a>
    </div>
    <div id="collapseTwo" class="accordion-body collapse">
      <div class="accordion-inner">

        <!-- Here we insert another nested accordion -->

        <div class="accordion" id="accordion2">
          <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseInnerOne">
                Collapsible Inner Group Item #1
              </a>
            </div>
            <div id="collapseInnerOne" class="accordion-body collapse in">
              <div class="accordion-inner">
                Anim pariatur cliche...
              </div>
            </div>
          </div>
          <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseInnerTwo">
                Collapsible Inner Group Item #2
              </a>
            </div>
            <div id="collapseInnerTwo" class="accordion-body collapse">
              <div class="accordion-inner">
                Anim pariatur cliche...
              </div>
            </div>
          </div>
        </div>          

        <!-- Inner accordion ends here -->

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

请记住使用不同的手风琴ID。

原文链接:https://www.f2er.com/bootstrap/234169.html

猜你在找的Bootstrap相关文章