html - Twitter Bootstrap 中奇怪的 <section> 行为

标签 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

最佳答案

看起来文本在新选项卡周围 float 。尝试在该文本的 CSS 中使用 clear:left; 以查看它是否正确地回到选项卡下方。

关于html - Twitter Bootstrap 中奇怪的 <section> 行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15898814/

相关文章:

javascript - HTML5 模式仅允许 5 个逗号分隔的单词而不包含空格

html - 仅使用 CSS 滚动消息

CSS 菜单在 IE10 兼容模式下无法正常工作

javascript - 悬停时更改背景图像,但也可以使用 jQuery 单击

javascript - Twitter Bootstrap 日期时间选择器未在模式中正确显示

javascript - Bootstrap Daterange 选择器不显示

html - 用 CSS3 绘制圆弧 45 度段

javascript - 为什么我不能选择所有具有存储在变量中的属性值的元素?

javascript - 如何使用 JQuery 递归地为 DOM 子级设置样式值?

html - Bootstrap 将 header 与数据对齐