我可以在引导标签窗格中嵌入网格吗?

时间:2012-11-29 16:36:37

标签: twitter-bootstrap sass

我在我的页面中使用Bootstrap nav-tabs,如下所示:

<div class="container-fluid">

     <div class="row-fluid">
        <div class="span2">
        </div>
        <div class="span10">
            <!--Body content-->


<div class='row>
  <div class='span8'>
    <ul class="nav nav-tabs" id="myTab">
      <li class="active"><a href="#home">Home</a></li>
      <li><a href="#profile">Profile</a></li>
    </ul>

    <div class="tab-content">
      <div class="tab-pane active" id="home">...</div>
      <div class="tab-pane" id="profile">...</div>
    </div>

    <script>
      $(function () {
        $('#myTab a:last').tab('show');
      })
    </script>
  </div>
</div>


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

我想在tab-pane中组织一个网格, 我试过这个:

<div class='row'>
    <div class='span4'>...</div>
    <div class='span4'>...</div>
</div

在窗格内,但这不起作用。

如何使用bootstrap在我的tab-pane中嵌入列?

1 个答案:

答案 0 :(得分:0)

这对我有用http://jsfiddle.net/rKaaq/

<div class="row">
  <div class="span8">
    <ul class="nav nav-tabs" id="myTab">
      <li class="active"><a href="#home">Home</a></li>
      <li><a href="#profile">Profile</a></li>
    </ul>

    <div class="tab-content">
      <div class="tab-pane active" id="home"></div>
      <div class="tab-pane" id="profile">
      <div class="row">
        <div class="span4">This is some text that spans4</div>
        <div class="span4">This is some more text that spans 4</div>
       </div>  
      </div>
    </div>

    <script>
      $(function () {
        $('#myTab a:last').tab('show');
      })
    </script>
 </div>
</div>