JSFiddle - React, Tailwind, and code Playground

HTML

<div>Test</div>
<div>Test</div>
<div>Test</div>
<div>Test</div>
<div>Test</div>
<div>Test</div>
<div>Test</div>
<div>Test</div>

CSS

div:first-child:nth-last-child(n+7) {
      color: red;
    }