With the mask-image CSS property, we can easily apply a mask to any element.
The CSS is pretty simple, and as you can see, it works like the Background CSS property. We choose an image (a transparent PNG or better, a SVG file), and we can set his position and size. The mask can also be repeated (in x, y or both):
Did you like it? Take a second to support us on PayPal or Patreon!