html - Bootstrap : Propagate container height/width

标签 html css twitter-bootstrap

我有以下 html :

<div class="container-fluid" style="height: 80px;">
  <div class="row">
    <div class="component">
       ...
    </div>
  </div>
</div>

如何让我的组件与容器具有相同的高度?我可以在行和组件上设置 height:inherit; 但我想知道是否还有其他方法。

最佳答案

您可以在所有三个上使用相同的 CSS 类..

<div class="container-fluid equal">
  <div class="row equal">
    <div class="component equal">
       ...
    </div>
  </div>
</div>

.equal {
   height: 80px;
}

http://bootply.com/IkDJD4cf5G

关于html - Bootstrap : Propagate container height/width,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37964778/

相关文章:

html - 带 SVG 的 Div,分栏两行文本和下划线,无内联代码

html - 网站 wordpress 中的文本溢出

css - moz-selection 不适用于 Firefox

html - 用另一个类撤消应用的样式属性

javascript - 是否可以在服务器端制作浏览器?

javascript - 查找空 DOM 元素并使用 Jquery/Javascript 删除它们

移动导航栏的javascript事件

css - CSS Grid Layout 与其他布局系统有什么区别?

html - 无滚动+整页渐变(Wordpress模板)

html - 如何制作动画?