I am looking to design a dynamic snake/zigzag layout that consists of square images and circles, starting from the center of the container and descending in a winding fashion.
The number of elements is not fixed and is generated based on data received from the server.
Is there a way to accomplish this using only CSS?
Below is an example code snippet:
<div class="container">
<div class="square"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="square"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="square"></div>
/<div>