2017-07-06 83 views
-1

是否有快速Flexbox类来垂直对齐列内的内容?Bootstrap4垂直对齐列

例如

<div class="row"> 
     <div class="col"> 
     unknown height 
     </div> 
     <div class="col h100 d-flex justify-content-center"> 
     set same height as previous + flex center 
     </div> 
    </div> 

以上犯规很明显的工作,但你明白了吧...

相同高度的行可以用这个https://scotch.io/quick-tips/different-tricks-on-how-to-make-bootstrap-columns-all-the-same-height#toc-option-4-use-flexbox

实现 - >不觉得最流畅的解决方案,是不是有本地的引导类?

而且还有它仍然没有对齐的中间

+0

真实的,但没有清洁答案的问题... – niksos

回答

0

确定这就够了:

<div class="row align-items-center"></div>