I have a fixed image that overlays a page when the user is in the act of scrolling a touch screen (mobile).
I want to make that image "unclickable" or "inactive" or whatever, so that if a user touches and drags from that image, the page behind it still scrolls as if the image weren't there "blocking" the interaction.
Is this possible? If need be, I could try to provide screen shots exemplifying what I mean.
Thanks!
Conclusion. To make an area unclickable with CSS, we set the pointer-events CSS property to none .
To make a link unclickable using CSS, you can use the pointer-events property. Simply apply pointer-events: none; on the link that you want to make unclickable and it will not let you click the link.
-webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; However the mouse cursor will still change to a caret when over the element's text, so you add to that: cursor: default; Modern CSS is pretty elegant.
Setting CSS - pointer-events: none
should remove any mouse interaction with the image. Supported pretty well in all but IE.
Here's a full list of values pointer-events
can take.
CSS Pointer Events is what you want to look at. In your case, set pointer-events to "none". Look at this JSFiddle for an example... http://jsfiddle.net/dppJw/1/
Notice that double clicking on the icon will still say you click the paragraph.
div.child { ... background: #fff; pointer-events: none //This line is the key! }
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