Is it possible to add an unclickable overlay on top of an image?
I have provided a CodePen link in the comments section.
Here is the HTML for the image:
<img src="https://www.codeproject.com/KB/GDI-plus/ImageProcessing2/img.jpg" />
And here is the CSS code to achieve the desired effect:
img{
width:100px;
height:100px;
cursor: not-allowed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5);
z-index: 1000;
}
The overlay will have grey opacity and cover the image completely. For reference, please see this example: