Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to allow clicking on elements behind elements with a higher z-index

Tags:

css

z-index

I would like to put a reflection over the entire page. I have a transparent png that fades from white to transparent and I would like it to fill the browser and be displayed above everything else but allow the user to click on everything behind it, not be able to be dragged, and work in all browsers. Is this possible?

like image 728
user852974 Avatar asked Oct 25 '25 13:10

user852974


1 Answers

You can use pointer-events: none, which works everywhere except IE10 and older.

A blog post with more information:

http://robertnyman.com/2010/03/22/css-pointer-events-to-allow-clicks-on-underlying-elements/

like image 110
thirtydot Avatar answered Oct 27 '25 02:10

thirtydot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!