Edit in JSFiddle

<div class="flex-container">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
  <div>7</div>
  <div>8</div>
  <div>9</div>
  <div>10</div>
  <div>11</div>
  <div>12</div>
</div>
.flex-container {
  display: flex;
  flex-flow: row-reverse wrap-reverse;
  background: #ddd;
}

.flex-container>div {
  background-color: #ffffff;
  width: 100px;
  margin: 10px;
  text-align: center;
  line-height: 75px;
  font-size: 30px;
  border: 2px solid #00a9d4;
  font-family: Calibri, sans-serif;
  border-radius: .25rem;
}