我希望能够<defs>在页面上定义一次掩码,然后在多个<svg>元素中重用它.
例如:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xlink="http://www.w3.org/1999/xlink">
<defs>
<clipPath id="SvgjsClipPath1009">
<rect width="200%" height="80%" x="0" y="20%"></rect>
<rect width="200%" height="80%" x="0" y="20%"></rect>
</clipPath>
</defs>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xlink="http://www.w3.org/1999/xlink">
<g clip-path="url(#SvgjsClipPath1009)">
<image class="Chevron-Image" xlink:href="http://placekitten.com/g/1200/1200" width="1200" height="1200" x="50%" y="50%"></image>
</g>
</svg>
Run Code Online (Sandbox Code Playgroud)
目前,这在Chrome中无效.这样做是否有诀窍或所有SVG都必须是自包含的?