I have a container div
with an SVG mask-image
applied to it. It works just fine, the div
has the "shape" of the SVG itself. When I add another element as a child, say a text one (or another div
), the element is being "cut" (masked) itself. I think this is the normal behavior of the mask.
Any way to show the child element, despite the mask applied to the parent div
? Possibly without using absolute positioning.
https://codepen.io/gremo/pen/vYdRjgo
.mask-wave {
mask-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/sun.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
}