Let's say I have a web page containing various controls, some of which have hover and click behaviors defined on them. Then, I add to the page a translucent DIV overlay with extra information, to be superimposed on top of the rest of the page:
<div class="overlay"></div>
.overlay {
position: fixed;
top: 0px;
left: 0px;
height: 100%;
background: rgba(0,0,0,.5);
}
This overlay creates a new layer on top of the other content, which is desired, but unfortunately it also blocks mouse behaviors with the underlying controls. When the new layer is enabled, hovering and clicking on the underlying controls does nothing.
Is there a way to use an overlay in this fashion while preserving mouse interaction with the underlying content?
In my application, the overlay is required, but I can use any JavaScript, CSS, jQuery, or other techniques that might work.
Thanks!