html – How can I change the CSS of an element while hovering over the next element?

I want to change the opacity of .dividor to 0 while hovering over another division. I don’t know how to do this for .secondDiv. I’m just learning CSS.


<div class="base">
   <div class="FirstDiv"></div>
   <div class="Dividor"></div>
   <div class="SecondDiv"></div>


.base > div:hover + div {
  opacity: 0;

Write a Comment

Your email address will not be published. Required fields are marked *