html - 从 Twitter Bootstrap 模态中删除模态页脚

标签 html css twitter-bootstrap

我想从模式中删除页脚。但它只是删除了内容,并没有删除它所获得的空间。

这是我的代码...

<div class="modal hide fade">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times; </button>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
</div>

最佳答案

如果您不使用 ' <div class="modal-footer"> ' 在你的模态模板中,那么 bootstrap 就会为你制作它。我认为这就是您看到代码页脚的原因。 我的解决方案是将页脚隐藏在模板中(最后一行):

<div class="modal hide fade">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;       </button>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
  <div class="modal-footer" style="display:none"></div>
</div>

关于html - 从 Twitter Bootstrap 模态中删除模态页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15611921/

相关文章:

php - 使用 jQuery 在 PHP/HTML 中输出相关的嵌套表

html - 如何使用 Bootstrap 使矩形居中并响应?

javascript - 多个 Bootstrap 按钮无法顺利悬停

css - 使用绝对位置时,页脚未与屏幕底部对齐

html - 如何将列从导航栏拉伸(stretch)到窗口底部?

jquery - 在嵌套 DIV 的情况下将图像设置在 DIV 的中间

python - BeautifulSoup </div> 抓取突然停止工作

html - 使用 li :first-child is grabbing all first-child li elements in a given class

html - Css 问题 : font-size

html - 如何使页面顶部的两个表格彼此相邻对齐