Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent div from being clickable and interfering with javascript

On my website I have a webgl display of buildings, you can use the mouse to rotate the display and pan around. I then added a CSS animation of clouds, only when these clouds are in front of the webgl buildings it stops you from being about to use the mouse to rotate and pan. Is there a way of making it so the cloud divs aren't clickable or don't interfere with the webgl?

like image 661
user2953989 Avatar asked Mar 13 '23 03:03

user2953989


2 Answers

Give pointer-events:none; to the css of the clouds.. so that the click events on the cloud are passed on to the object that lies under it..:)

like image 174
Adarsh Mohan Avatar answered Apr 20 '23 00:04

Adarsh Mohan


Try adding this to your CSS:

.cloud {
    pointer-events: none;
}
like image 34
rphv Avatar answered Apr 19 '23 23:04

rphv