If I have a #div1
and a #div2
, and they are siblings , I know that I can use the ~
selector to style #div2
as follows:
#div1:hover ~ #div2 { /* regras */ }
Is there any equivalent selector to stylize #div2
when a #div1:hover
event occurs in the following structure?
<div id="pai">
<div id="div1"></div>
</div>
<div id="div2"></div>