Twitter bootstrap 如何使行拉伸剩余高度
我正试图将Twitter bootstrap 如何使行拉伸剩余高度,twitter-bootstrap,bootstrap-4,flexbox,Twitter Bootstrap,Bootstrap 4,Flexbox,我正试图将容器流体和第二排流体拉伸到剩余高度,但我找不到方法 我已尝试将对齐项目/align self设置为拉伸,但也不起作用 下面是我的代码结构: <div class="container-fluid"> <!-- I want this container to stretch to the height of the parent --> <div class="row"> <div class="col">
容器流体
和第二排流体
拉伸到剩余高度,但我找不到方法
我已尝试将对齐项目/align self
设置为拉伸
,但也不起作用
下面是我的代码结构:
<div class="container-fluid"> <!-- I want this container to stretch to the height of the parent -->
<div class="row">
<div class="col">
<h5>Header</h5>
</div>
</div>
<div class="row"> <!-- I want this row height to filled the remaining height -->
<widgets [widgets]="widgets" class="hing"></widgets>
<div class="col portlet-container portlet-dropzone"> <!-- if row is not the right to stretch the remaining height, this column also fine -->
<template row-host></template>
</div>
</div>
</div>
标题
我使用的是引导程序4 A6。有人能建议我如何使容器和行拉伸剩余高度吗?Bootstrap 4.1.0有一个用于
flex grow
的实用程序类,它是行填充剩余高度所需的工具类。您可以为此添加自定义的“填充”类。您还必须确保容器为全高
bootstrap4.1中的类名是flex-grow-1
html,正文{
身高:100%;
}
.柔性填料{
弹性:1;
}
标题
内容
相关:只是一个问题,为什么我们需要在这里同时使用
align items拉伸align content拉伸
呢?实际上两种都不需要