Reputation: 216
Basically, I want to have a layer on top of another without catching input.
The goal is to have a PNG over my webpage that will create an effect, a bit like a filter.
My problem is if it’s over, the text becomes unselectable & unclickable.
Any ideas?
Upvotes: 0
Views: 404
Reputation: 62402
It depends on your needs, but in the past when there was a specific element that I wanted to be able to click through a layer. I would position a transparent div absolutely positioned to the exact position as the underlying that would trigger the event for the underneath element. It is very easy to match positions with javascript and just set the z-index higher than the overlay.
Of course this is easy If you are dealing with a single element or even two, could get exponentially cumbersome to use this for an entire page under an overlay for example.
Upvotes: 1