Twitter bootstrap 引导垂直对齐属性不工作

Twitter bootstrap 引导垂直对齐属性不工作,twitter-bootstrap,bootstrap-4,vertical-alignment,Twitter Bootstrap,Bootstrap 4,Vertical Alignment,一个非常基本的问题来自于Bootstrap的文档。到目前为止,一切似乎都很顺利,除了垂直对齐。在以下图像中,您可以看到和 三列之一 三列之一 三列之一 垂直中心与高度相关。在您的示例中,所有同级列的高度都相同,因此您不会看到任何对齐变化 .row需要有一个定义的高度,或者列中的某些内容导致该行具有更高的高度 <div class="container"> <div class="row" style="height:180px"> <div

一个非常基本的问题来自于Bootstrap的文档。到目前为止,一切似乎都很顺利,除了垂直对齐。在以下图像中,您可以看到和


三列之一
三列之一
三列之一

垂直中心与高度相关。在您的示例中,所有同级列的高度都相同,因此您不会看到任何对齐变化

.row
需要有一个定义的高度,或者列中的某些内容导致该行具有更高的高度

<div class="container">
    <div class="row" style="height:180px">
        <div class="col align-self-start">
            One of three columns
        </div>
        <div class="col align-self-center">
            One of three columns
        </div>
        <div class="col align-self-end">
            One of three columns
        </div>
    </div>
</div>

三列之一
三列之一
三列之一

演示:

@user7759474这行吗?请接受答案,以便其他人知道问题已解决
<div class="container">
    <div class="row" style="height:180px">
        <div class="col align-self-start">
            One of three columns
        </div>
        <div class="col align-self-center">
            One of three columns
        </div>
        <div class="col align-self-end">
            One of three columns
        </div>
    </div>
</div>