Clipping and Masking Overview and Difference
suggest changeWith Clipping and Masking you can make some specified parts of elements transparent or opaque. Both can be applied to any HTML element.
Clipping
Clips are vector paths. Outside the path the element is not painted; inside it, the element is painted normally. Set the path with clip-path. Basic shape functions include circle(), ellipse(), and polygon(). A url() can reference an SVG <clipPath>.
Example
clip-path: circle(100px at center);
The element will be only visible inside of this circle, which is positioned at the center of the element and has a radius of 100px.
Masking
Masks are similar to clips, but instead of a path you supply an image that is layered with the element. That image is often thought of in black, white, and gray, or in terms of its alpha channel.
Luminance mask: White shows the element and black hides it. Gray is partly transparent, which allows smooth transitions.
Alpha mask: The element is shown where the mask is opaque and hidden where the mask is transparent. Partial alpha produces partial transparency. The default mask-mode is alpha, not luminance.
This image for example can be used as a luminance mask to make for an element a very smooth transition from right to left and from opaque to transparent.
The mask shorthand lets you specify the mask image and the mask mode.
Example
mask: url(masks.svg#rectangle) luminance;
An element called rectangle defined in masks.svg will be used as an luminance mask on the element.