I have not been able to find an answer for this, so here goes:
I have 4 divs on the page. When one div is :active, I want all the other divs to adopt opacity:0;
has anyone come up with a way to select all siblings, not just siblings that come after the :active
element?
<div class="circle c1"> </div>
<div class="circle c2"> </div>
<div class="circle c3"> </div>
<div class="circle c4"> </div>
<style type="text/css">
.c2:active ~.circle {
opacity: 0;
}
</style>
From this example, the .c1 div will never disappear. What is a solution that uses only CSS?