Bootstrap按钮组在手风琴内部无法正常工作

时间:2013-11-27 06:50:37

标签: twitter-bootstrap accordion buttongroup

Bootstrap按钮组在手风琴内部无法正常工作。

<div class="panel-body">
      <label>Group Item #1 content</label>
      <div class="btn-group" data-toggle="buttons">
       <button type="button" class="btn btn-default active">Left</button>
       <button type="button" class="btn btn-default">Middle</button>
     </div>
</div>

这是我的jsfiddle

1 个答案:

答案 0 :(得分:0)

我认为这是关于它的

<div class="panel-group" id="accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
          Collapsible Group Item #1
        </a>
      </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse in">
      <div class="panel-body">
<div class="btn-group">
          <button type="button" class="btn btn-default">ON</button>
          <button type="button" class="btn btn-default">OFF</button>
        </div>
      </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
          Collapsible Group Item #2
        </a>
      </h4>
    </div>
    <div id="collapseTwo" class="panel-collapse collapse">
      <div class="panel-body">
<div class="btn-group">
          <button type="button" class="btn btn-default">ON</button>
          <button type="button" class="btn btn-default">OFF</button>

        </div>
    </div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
          Collapsible Group Item #3
        </a>
      </h4>
    </div>
    <div id="collapseThree" class="panel-collapse collapse">
      <div class="panel-body">
<div class="btn-group">
          <button type="button" class="btn btn-default">ON</button>
          <button type="button" class="btn btn-default">OFF</button>

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

Fiddle