5 ms·
This isn't really a mask in the more commonly perceived digital graphics sense, in it's not actually creating transparent negative space around your image. The
by ja2ke 15y ago
This isn't really a mask in the more commonly perceived digital graphics sense, in it's not actually creating transparent negative space around your image. The "masked" area is still a solid color, in this case white.
It would be more appropriate, and less flashy, to call this PNG matting, because it's far more analogous to cutting a matte (overlaying a paper stock frame over your artwork to shape it's borders) than it is to an actual mask (using an overlaid shape to actually define a new transparent alpha channel for your image)
- alanh 15y agoYep. Webkit's actual masking is considerably more flexible. For instance, you can use one image as a mask, then color it (by setting the background color) to whatever you want… then varying the opacity… and it doesn't only work on solid backgrounds. (This is PERFECT for close buttons on your notifications, if you use e.g. green for success and red for failure, and now you don’t need to fire up an image editor when you tweak the color palette or add another class of notification.) Of course, it’s quite limited in cross-browser applicability. http://caniuse.com/#feat=css-masks http://caniuse.com/#feat=css-masks