<h1><code>align-items: flex-start</code></h1>
<h1><code>align-content: flex-end</code></h1>
<div class="container flex-end">
      <div class="item item-1">1</div>
      <div class="item item-2">2</div>
      <div class="item item-3">3</div>
      <div class="item item-4">4</div>
      <div class="item item-5">5</div>
      <div class="item item-6">6</div>
      <div class="item item-7">7</div>
      <div class="item item-8">8</div>
      <div class="item item-9">9</div>
</div>
html {
  background: #fff7f6;
}
h1 {
  color: DarkSlateGrey;
  font-weight: normal;
  font-size: 1.5em;
}
/*-- --*/
.container {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  max-width: 700px;
  min-height: 500px;
  border-bottom: 5px dashed tomato;
  border-top: 5px dashed tomato;
}
.container.flex-end {
  align-items: flex-start;
  align-content: flex-end;
}
.item {
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  padding: 3rem;
  background: mistyrose;
  border: 3px solid tomato;
  color: tomato;
  margin: 6px;
}
.item.item-2,
.item.item-8,
.item.item-9{
  padding: 5rem;
}
.item.item-3,
.item.item-7{
  padding: 2.5rem;
}
.item.item-4,
.item.item-6{
  padding: .5rem 2rem 3rem;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.