在SVG路径中插入背景图像(视差滚动)

时间:2019-10-30 20:16:46

标签: html css svg svg-animate

我有一个带有path元素的简单SVG:

<svg id="corners" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><title>Corners</title>
    <rect width="120" height="120" fill="#262626"/>
    <path id="star" class="morph" d="M62.379999999999995 3.1399999999999864L79.58000000000001 38 118 43.56999999999999 90.21000000000001 70.69999999999999l6.57 38.3 -34.4 -18.08L28 109l6.57 -38.3 -27.83 -27.12L45.18000000000001 38z" fill="#8cc63f"/>
</svg>

如何在path元素的背景中添加背景图像(带有少许视差滚动)? style="background-image:url()"无法正常工作。

0 个答案:

没有答案
相关问题