Answer the question
In order to leave comments, you need to log in
How to swap divs?
An example is 4 blocks codepen.io/Keche/pen/JWMPBa
If you create conditions for the blocks to line up under each other. Then the sequence of blocks will be as follows:
Block 1
Block 2
Block 3
Block 4
And how to make it so that with adaptability it would be like this:
Block1
Block3
Block2
Block4
Answer the question
In order to leave comments, you need to log in
If you can use flexbox. That is very simple.
If not, I solved this problem by duplicating the block.
Just put blocks 1 and 3 in one div, and 2 and 4 in another. In the styles of the new blocks, set the rubber width and "float: left"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question