twitter-bootstrap - 拉伸(stretch)页面始终为 100% 高度?

标签 twitter-bootstrap css

我正在 Twitter Bootstrap 中创建一个网页(如果它重要的话)并且我希望该页面是 100%;高度,所以页面底部或顶部不会有任何空白区域,现在看起来像这样:

enter image description here

我希望它看起来像这样:

enter image description here

虽然长页面在容器中不应该有任何额外的空白,但它仍然是 100% 的高度,如下所示:

enter image description here

但是我怎样才能做到这一点呢?由于布局是流动的?

最佳答案

我会使用 display: table 和 display: table-row。对于不支持 display: table 的旧浏览器,您可以使用 Modernizr 和 jQuery 后备。这是一个 fiddle :

http://jsfiddle.net/85FHe/11/

有关 CSS 表格显示支持的更多信息,请访问 http://caniuse.com/css-table .

关于twitter-bootstrap - 拉伸(stretch)页面始终为 100% 高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12912793/

相关文章:

jquery - 当父 div 淡出时保持按钮不透明

javascript - 为什么使用 JS 更改此 CSS 效果仅适用于某些值?

html - Bootstrap/Foundation 中的多列列表

twitter-bootstrap - 如何在 Bootstrap 中使用 css(不是 JS)向 span 的内容添加填充?

javascript - Angular-bootstrap 试图从 Controller 中调用 collapse

html - 使用 CSS 在 anchor 内垂直对齐图像

jquery - 如何在将两者居中之前从屏幕外左侧滑入文本以附加到现有的居中句子

html - 根据语言更改字体大小

css - UL 和 float DIV : list text wraps but background color doesn't

css - 日历的制作方法