JSFiddle - React, Tailwind, and code Playground
by davidxmartins
HTML
<div class="container">
<a tabindex="1" class="testA">Test A</a> | <a tabindex="2" class="testB">Test B</a> | <a tabindex="3" class="testC">Test C</a>
<div class="hiddendiv" id="testA">1</div>
<div class="hiddendiv" id="testB">2</div>
<div class="hiddendiv" id="testC">3</div>
</div>
CSS
.hiddendiv {display: none; }
.testA:focus ~ #testA {display: block; width: 100vw; height: 100vh; background: green;}
.testB:hover ~ #testB {display: block; width: 100vw; height: 100vh; background: blue;}
.testC:focus ~ #testC {display: block; width: 100vw; height: 100vh; background: red;}