SVG 요소 내부에 하나 개 이상의 요소에 그라데이션을 적용 :나는이 사용 SVG 요소처럼 보이는 화살표를 만들려고하고
:이
내 시도
그래디언트가 내 SVG에있는 다각형에 적용됩니다. SVG의 상단 이미지에 그래디언트 효과를 복제하는 방법이 있습니까?
아마도 CSS를 사용하는 방법일까요? 어쩌면 경로 또는 단일 다각형 요소를 사용하여 대신 & 다각형 대신 화살표를 생성해야합니까?
<svg width="424" height="100">
<defs>
<radialGradient id="grad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
<stop offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:0" />
<stop offset="100%" style="stop-color:rgb(13,20,93); stop-opacity:1" />
</radialGradient>
</defs>
<rect x="0" y="25" rx="0" ry="0" width="212" height="50" fill="url(#grad1)"> </rect>
<polygon points="212,0 212,100 424,50" fill="url(#grad1)"></polygon>
</svg>