<p> "flex-direction: row-reverse;" xếp chồng các mục theo chiều ngang (theo chiều từ phải sang trái): </p>

<div class = "flex-container">
   <div> 1 </div>
   <div> 2 </div>
   <div> 3 </div>
</div>
.flex-container {
  display: flex;
  flex-direction: row-reverse;
  background-color: DodgerBlue;
}

.flex-container > div {
  background-color: #f1f1f1;
  width: 100px;
  margin: 10px;
  text-align: center;
  line-height: 75px;
  font-size: 30px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.