PNG alpha as a separate file?

Is there a way to use a grayscale or bitmap image as an alpha channel in HTML, and not save it as a transparent PNG?

I have about 12 variations of transparency templates that I need to apply to about 200 images. I do not want to make 2400 images for every possible combination. I would say: "Use this image for transparency in this image."

This should not be compatible with older browsers, as it will be used for internal use. Can HTML5 do this?

+4
source share
1 answer

Yes, you can do this with image masks. Currently only supported in Webkit browsers.

Read all about it .:. And an example of use.

+2
source

Source: https://habr.com/ru/post/1401895/


All Articles