我有一个 SVG,我想从左到右和向后设置渐变停止动画。我设法从左到右设置动画,但我不知道如何设置动画。
这是我的代码:
<svg id="mySvg" width="700px" height="498px">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-0.4998" y1="250" x2="700" y2="250">
<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.1">
<animate attributeName="offset" begin="0s" dur="2s" from="0" to="1" repeatCount="indefinite" />
</stop>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0.1"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M691.115,114.684c-9.084,0-16.193,7.1 ..."/>
</svg>
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能创建一个动画,使渐变停止不断从左向右和向后移动?
非常感谢,
文森特