CSS mask-composite property
CSS mask-composite property defines multiple composite operations to combine multi mask layers.
The first url layer is at the top i.e. close to the user. The last url is at the bottom of all the layers i.e. far away from the user.
In the demo, the circle is closer to the user than the square shape. Then the source layer is the circle while the square is the destination layer.
mask-composite : add | subtract | intersect | exclude | clear | copy | destination-atop | destination-in | destination-out | destination-over | source-atop | source-in | source-out | source-over | xor
The source layer is placed over the target layer.
The destination mask layer will be subtracted from the source layer and then only the remaining source layer is visible.
Only the intersected portion of both layers is visible.
It is opposite to that of 'intersect' i.e. the portions of both layers that don't intersect are visible.
It does not enable any layer.
Only the source layer is visible.
It places the source layer over the destination layer.
It places the destination layer over the source layer.
represents only the source area that overlaps the destination layer.
represents only the destination area that overlaps the source layer.
It represents the portion of source layer that falls outside the overlapping area.
It represents the portion of destination layer that falls outside the overlapping area.
It represents both the overlapping area and destination area.
It represents both the overlapping area and source area.
The non-overlapping regions of both the source and destination layers.
It applies to all elements
Was this article helpful?