Twitter Bootstrap中奇怪的<section>行为</section>

时间:2013-04-09 09:53:57

标签: html css twitter-bootstrap

我一直在微型项目上使用Twitter Bootstrap。我正在使用它,并且有一些奇怪的行为。我有jQuery,它允许我在单击按钮时创建新选项卡。新选项卡处于活动状态并包含表单。这个表格取代了下面的标题,我找不到原因。有人可以帮忙吗?

代码段:

<section id="builder">
  <div class="page-header">
    <h1>App Builder. <small>Create your app.</small></h1>
  </div>
  <div class="span7">
    <!-- ===== App Title ===== -->
    <div class="control-group">
      <label class="control-label" for="appTitle">App Title</label>
      <div class="controls">
        <input type="text" class="input-xlarge" id="appTitle">
        <p class="help-block">Enter the title for your app. It will appear at the top of your app.</p>
      </div>
    </div>
    <!-- ===== App Subtitle ===== -->
    <div class="control-group">
      <label class="control-label" for="appSubtitle">App Subtitle</label>
      <div class="controls">
        <input type="text" class="input-xlarge" id="appSubtitle">
        <p class="help-block">Enter the subtitle for your app. It will appear below the title.</p>
      </div>
    </div>
    <!-- ===== App Theme ===== -->
    <div class="control-group">
      <label class="control-label" for="appTheme">App Theme</label>
      <div class="controls">
        <select id="appTheme">
          <option>Dark</option>
          <option>Light</option>
        </select>
        <p class="help-block">Select the theme for your app. You can preview your theme on the right.</p>
      </div>
    </div>
    <!-- ===== App Pages ===== -->
    <p>App Pages</p>
      <ul class="nav nav-tabs" id="tabHeaders">
      <li><a href="javascript:void(0);" id="createTab"><i class="icon-plus"></i>Add Page</a></li>
      <!-- Tabs (Created by Javascript) -->
      </ul>
      <div class="tab-content" id="tabContent">
      <!-- Tab Content (Created by Javascript) -->
      </div>
  </div>
  <div class="span4">
    <div class="iphonebackground">
      <div class="screenbackground"></div>
    </div>
  </div>
</section>
<section id="preview">
  <div class="page-header">
    <h1>Preview your App. <small>See your app in it's full glory before you download it.</small></h1>
  </div>
</section>

在添加新标签之前: Before Adding New Tab

添加新标签后: After Adding New Tab

1 个答案:

答案 0 :(得分:1)

看起来文本正在新选项卡周围浮动。尝试在CSS中使用clear:left;来查看该文本是否正确地退回到标签下方。