title: CSS - Stack list item below each other
body: <p>Supposed I have a growing list:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;#1&lt;/li&gt;
    &lt;li&gt;#2&lt;/li&gt;
    &lt;li&gt;#3&lt;/li&gt;
    ......
  &lt;/ul&gt;
  </code></pre>
  
  <p>And I want to make it to look like a stack, meaning the former ones will be above the latter ones. For example:</p>
  
  <p><a href="https://i.stack.imgur.com/pmKWi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pmKWi.png" alt="enter image description here"></a></p>
  
  <p>I guess I may have to make each list item float to left, shift it with something like <code>left: -5px;</code>, and decrease the z-index, but since there might be indefinite numbers of items, I am not sure how to achieve it for all items with CSS.</p>
  
  <p>Thanks </p>