JSFiddle - React, Tailwind, and code Playground

HTML

<article class="post">Abc</article>
<article class="post">Abc</article>
<article class="post">Abc</article>
<article class="post">Abc</article>

CSS

.post {
    width:600px;
    height:200px;
    background-color:red;
    margin-bottom:10px;
}

.post:nth-child(odd) {
    background-color:blue;
}

.post:hover {
    background-color:green;
}