No sorry. You can't do what you want with pure SVG. The only sort-of workaround I can think of is a mixed SVG+HTML solution where your text was actually a hole in a solid colour shape (eg a <rect>
) through which you could see the background of the <svg>
s parent element. And put the background on the parent element.
Ie. something like:
<div style="background:url(foo); background-attachment:fixed">
<svg>
<defs>
<mask id ="mytext">
<text>My text</text>
</mask>
</defs>
<rect mask="url(#mytext)"/>
</svg>
</div>
This has been simplified for clarity, but hopefully you get the idea.