【发布时间】:2022-01-04 03:55:28
【问题描述】:
我想要实现的是将图像放置在 SVG blob 中。问题是图像不在 blob 内部,而是在 blob 的边界上“突出”。我的目标是不在 blob 之外显示图像。任何帮助将不胜感激。
<svg id="visual" viewBox="0 0 500 500" width="500" height="500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<rect x="0" y="0" width="500" height="500" fill="#fff">
</rect>
<g transform="translate(292.7 145.85)">
<path id="svg1" d="M189.3 52.1C189.3 166.7 94.7 333.3 -21.3 333.3C-137.3 333.3 -274.7 166.7 -274.7 52.1C-274.7 -62.5 -137.3 -125 -21.3 -125C94.7 -125 189.3
-62.5 189.3 52.1" fill="#2590eb">
</path>
</g><image xlink:href="https://www.pngplay.com/wp-content/uploads/7/Happy-Person-Transparent-Background.png" x="0" y="0" width="100%" height="100%" clip-path="url(#svg1)" preserveAspectRatio="xMidYMid slice"/>
</svg>
【问题讨论】: