Html 引导4,容器中的flexbox行。在页面中垂直对齐

Html 引导4,容器中的flexbox行。在页面中垂直对齐,html,css,twitter-bootstrap,flexbox,Html,Css,Twitter Bootstrap,Flexbox,我使用的是Bootstrap 4 alpha 3,我需要一个简单的垂直对齐此代码,在页面中使用此代码: <div class="container"> <div class="row"> <div class="col-sm-4" style="background-color:#ff0000;">Prova</div> <div class="col-sm-4"> <

我使用的是Bootstrap 4 alpha 3,我需要一个简单的垂直对齐此代码,在页面中使用此代码:

<div class="container">
      <div class="row">
        <div class="col-sm-4" style="background-color:#ff0000;">Prova</div>
        <div class="col-sm-4">
          <h1 class="text-xs-center">HELLO!</h1>
        </div>
        <div class="col-sm-4"></div>
      </div>
    </div>

普罗瓦
你好

如果您可以选择使用v4的flexbox模式,列将自动具有相同的高度


然后要垂直对齐文本,请将
display:flex
align items:center
添加到所需列。

添加此css将解决此问题。容器h1{margin:0px;}对于整页容器高度,我该怎么办?尝试
html,body,.container{height:100%;}
?什么都不做。如果我使用
height:600px,它就可以工作例如在
.row
上。确定,然后将.row包括在上面确定。现在它起作用了。有可能找到一个自然的方式与引导4?