Is it possible to somehow watermark an html page with a semi-transparent image that still lets through user interaction on the page behind it? Contradictory, and doesn't seem possible without some complicated scripting, but maybe I'm missing something.
This will work for most modern browsers:
div#watermark {
position: fixed;
width: 100%;
height: 100%;
z-index: 99999;
background: url('path/to/image.png') center center no-repeat;
pointer-events: none;
}
Unfortunately, IE doesn't recognize the pointer-events
property, so you need to use a javascript fallback like this one if needed. Also, some older mobile browsers/old IE don't support position: fixed
, so that'll also require another javascript fallback to position the image in the center of the viewport.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With