I'm encountering difficulty in applying a mask to only the top portion of an element rather than the entire element. I'm uncertain if I'm approaching this correctly.
I have an element called "footer" with a gradient. Behind this footer, there may be additional graphical elements.
My aim is to mask the top 100 pixels of this footer to create a smooth transition of the footer's gradient.
However, when I apply the mask, everything that isn't a colored object within the SVG is also masked away, including the area outside of the SVG.
The element
<footer class="footer">
</footer>
The styling
.footer {
position: relative;
background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);
height: 200px;
-webkit-mask-image: url('@/../public/SVG/AutomationLanscape.svg');
mask-image: url('@/../public/SVG/AutomationLanscape.svg');
-webkit-mask-size: 1000px auto;
mask-size: 1000px auto;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
mask-position: top;
}
- The gray is the background on the webpage and is not related to the footer.
- The red is the size if the SVG
- the blue is what i dont want masked.
This should create a landscape popping up from the footer element.