JSFiddle - React, Tailwind, and code Playground

HTML

<div class="a">a</div>
<div class="b">b</div>

CSS

div:hover:not(.a) {
  background-color: red;   
}