Monday 26 November 2018

Can HTML and CSS only create an overlay which ignores transparent area on an image automatically?

For example, it has an image with a transparent background:




Enter image description here



And I would like to add an gray overlay (for example, a div, or canvas...) on it:



Enter image description here



But I want the overlay ignores transparent area on an image automatically:



Enter image description here




Can pure HTML and CSS (for example, by div, canvas...) do this?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...