To add a mask layer, use the mask-image
property and specify the image source with the url()
function.
This property also takes gradient data type.[1] For example, you can set a linear-gradient
mask to make the top of the background transparent, fading towards the opaque bottom.