Свойство flex-direction определяет направление главной оси флекс-контейнера. Значение column указывает что ось идёт снизу вверх.
.container {
display: flex;
flex-direction: column-reverse;
}
.container { position: relative; } .rabbits, .hats { position: absolute; width: 100%; } .hats { display:flex; flex-direction: column-reverse; } .rabbits img, .hats img { width: 100px; height: auto; }