<svg width="100%">
<linearGradient id="gradient">
<stop offset="0%" style="stop-color: red" />
<stop offset="100%" style="stop-color: yellow" />
</linearGradient>
<rect x="20" y="20" width="300" height="100" style="fill: url(#gradient)"></rect>
</svg>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.