title: How to add z-index on before?
body: <p>Every div should have an arrow. I want something like this:
  <a href="https://i.stack.imgur.com/a68Kl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a68Kl.png" alt="four horizontally arranged blocks. Each, except the last, has a wedge on the right hand side"></a></p>
  
  <p>Any suggestions on how can I do that?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div {
    position: relative;
    background-color: #008000;
    padding: 0px 16px;
    height: 40px;
    line-height: 40px;
    display: inline-block;
    color: white;
    border: 2px solid black;
    border-right: none;
    z-index: 1;
    margin-right: -5px;
  }
  
  div:before {
    content: '';
    position: absolute;
    left: 100%;
    z-index: -1;
    width: 28px;
    height: 28px;
    background-color: #008000;
    border-right: 2px solid black;
    border-bottom: 2px solid black;
    transform: rotate(-45deg) translate(-14px, -7px);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;arrow with border&lt;/div&gt;
  &lt;div&gt;arrow with border&lt;/div&gt;
  &lt;div&gt;arrow with border&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>