CSS mask-size property
CSS mask-size property defines the size of mask image on the mask painting area.
mask-size : contain | cover | auto | +ve length | +ve percentage
The size of mask image is automatically calculated.
The image is rescaled to the largest size such that both sides of the image fit inside the mask painting area while preserving the aspect ratio.
The image is rescaled to the smallest size such that it covers the mask painting area completely while preserving the aspect ratio.
We specify fixed length for the mask image size.
It represents the image size as the percentage of mask painting area.
30% means the mask image occupies the 30% of element. And three images can fill the painting area of element with this size.
It applies to all elements
Was this article helpful?