Check out example codes for "como trocar ordem dos elementos pelo dispositivo html". It will help you in understanding the concepts better.

Code Example 1

.container div {
width: 100px;
height: 50px;
display: inline-block;
}

.one { background: red; }
.two { background: orange; }
.three { background: yellow; }
.four { background: green; }
.five { background: blue; }

@media screen and (max-width: 531px) {
.container { display: flex; flex-flow: column-reverse; }
}

Learn ReactJs, React Native from akashmittal.com