SVG 그라데이션

by JM note

HTML

<svg width="100" height="100">
  <defs>
    <linearGradient id="grad1" x2="0%" y2="100%">
      <stop offset="5%" stop-color="red" />
      <stop offset="95%" stop-color="blue" />
    </linearGradient>
  </defs>
  <circle cx="50" cy="50" r="40" fill="url(#grad1)" />
</svg>