BootStarp4實做入門

10. 容器垂直對齊

  1. 全部垂直靠上對齊 .align-items-start
    <div class="container">
        <div class="row align-items-start">
            <div class="col">col 等寬 1/3</div>
            <div class="col">col 等寬 2/3</div>
            <div class="col">col 等寬 3/3</div>
        </div>
    </div>
  2. 全部垂直置中對齊 .align-items-center

    <div class="container">
        <div class="row align-items-center">
            <div class="col">col 等寬 1/3</div>
            <div class="col">col 等寬 2/3</div>
            <div class="col">col 等寬 3/3</div>
        </div>
    </div>
  3. 全部垂直靠下對齊 .align-items-end

    <div class="container">
        <div class="row align-items-end">
            <div class="col">col 等寬 1/3</div>
            <div class="col">col 等寬 2/3</div>
            <div class="col">col 等寬 3/3</div>
        </div>
    </div>
  4. 詳情:http://bootstrap.hexschool.com/docs/4.0/layout/grid/#%E5%9E%82%E7%9B%B4%E5%B0%8D%E9%BD%8A
  5. 範例:

    See the Pen 全部垂直對齊 by Tad (@tad0616) on CodePen.