Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to apply pointer-events:none; to one side of the div after rotating it?

I have a flip card (a div with transform: rotateY(180deg); on mouse hover). Some elements from the front side of the div interfere with mouse hover effect of elements on the back side of the div.

Is there a way to apply pointer-events:none; to the front side of the card after the card is flipped? I would do something like .back-side:hover .front-side{pointer-events:none;} but I can’t do it because .back-side nd .front-side are 2 different divs next to each other, and not parent and child elements.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Place front-side div after back-side div, like this:

<div class="back-side"></div>    
<div class="front-side"></div>

and add this style:

.back-side:hover + .front-side{pointer-events:none;}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading