title: How to change background color in odd/even div in descending order
body: <p>I need to change background color odd or even in div, with compulsory last div in grey color, last before div in green color, the same as follow all div's.</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>.main{
  width:500px;
  height: 500px;
  border:1px solid blue;
  }
  .box{
  width:300px;
  height: 100px;
  border:1px solid red;
  }
  
  .box:nth-child(odd) {
    background: grey;
  }
  
  .box:nth-child(even) {
    background:green;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="main"&gt;
  &lt;div class="box"&gt;1&lt;/div&gt;
  &lt;div class="box"&gt;2&lt;/div&gt;
  &lt;div class="box"&gt;3&lt;/div&gt;
  &lt;div class="box"&gt;4&lt;/div&gt;
  
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I try to change odd/even class in css, it is not meet my expectation.
  In last div is compulsary grey color, last before is in green color.
  Please any one guide, Thanks in advance.</p>