how can I reorder HTML using media queries?
问题 I want change a div element's position [in the viewed document order] by media query. <div>1</div> <div>2</div> When I change my viewport then I want to div_1 stay under the div_2 . Basically div_1 on the top. But I want change it by Media query. Can it is possible?? 回答1: Use flexbox and its order property I recommend a .wrapper , though you can use it on the body as well and get the same result @media screen and (max-width: 800px) { .wrapper { display: flex; flex-direction: column; }