Skip to content

Instantly share code, notes, and snippets.

@antonioJASR
Created March 15, 2020 04:16
Show Gist options
  • Save antonioJASR/488a0de3c0116e0772d6edde8638a4a1 to your computer and use it in GitHub Desktop.
Save antonioJASR/488a0de3c0116e0772d6edde8638a4a1 to your computer and use it in GitHub Desktop.
Apply Gradient to a Path
<svg width="660" height="220">
<defs>
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#05a"/>
<stop offset="100%" stop-color="#0a5"/>
</linearGradient>
</defs>
<path d="M150 0 L75 200 L225 200 Z" />
</svg>
path{
fill : url(#gradient)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment