<h1>stretch(デフォルト)</h1>
<div class="container container-stretch">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
</div>

<h1>flex-start</h1>
<div class="container container-flex-start">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
</div>

<h1>flex-end</h1>
<div class="container container-flex-end">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
</div>

<h1>center</h1>
<div class="container container-center">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
</div>

<h1>baseline</h1>
<div class="container container-baseline">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
</div>
.container {
    width: 200px;
    height: 200px;
    background-color: #eee;
    display: flex;
    flex-wrap: wrap;
}

.container-stretch {
    align-items: stretch;
}

.container-flex-start {
    align-items: flex-start;
}

.container-flex-end {
    align-items: flex-end;
}

.container-center {
    align-items: center;
}

.container-baseline {
    align-items: baseline;
}

.item {
    width: 50px;
}

.item:nth-child(1) {
    background-color: #fff001;
    height: 50px;
}

.item:nth-child(2) {
    background-color: #00a5e7;
    height: 100px;
}

.item:nth-child(3) {
    background-color: #00984b;
}

.item:nth-child(4) {
    background-color: #cd5638;
    font-size: 32px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.