i have a wave .svg in the hero section of the homepage here. i want to add an image to the background of the wave (so that it conforms to the shape of the wave rather than the parent div, and so that it sits behind the wave and has the wave’s colour over the top as a gradient). is it possible to the this in webflow or with custom code?
Thanks @IVG. I’ve used that tutorial a few times to clip text, but it seems unclear to me how I’d use it to clip an svg? Any tips? I’ve tried a few of the methods in the tutorial to no avail
Thanks @IVG. Sorry for the crude sketch but something like this where the photo acts as a fill for the svg wave so conforms to its shape rather than being a square/rectangle.
So what you would do is this:
prepare 2 SVG’s - 1 with the wave (and really just a gradient since it is going to be a square) and the second with a photo but with the bottom being cut out in a shape of a wave.
make 2 divs - one inside another (parent=>child)
in the child div put the 1st SVG (with the wave gradient) z-index 1
in the parent div put the the 2nd SVG (with the image and wave cutout) with z-index 2 and adjust its opacity as needed