How to position a div with css based on the order of this div in a list of divs?
问题 Okay, I want to position overlapping elements based on the order they appear in a list. So the first will not be translated, the second will be translated 60px, the third 120px, etc... This is just a simplified version of what I achieve. Also, in the example there are three elements, in real life I won't know how many elements there will be. This is variable. Below is a simple snippet that can achieve what I want, but you can easily see the problem with this: way to many lines of css... So