Hi
I'm trying to draw a simple SVG linear gradient. But the following code does not return what I expected:
1) the colors are in the wrong order
2) the gradient should be from top to bottom. But is only on a small area.
Any suggestions how to make a smooth gradient? Without "userSpaceOnUse" it is even worse...
I'm trying to draw a simple SVG linear gradient. But the following code does not return what I expected:
<svg width="12cm" height="4.5cm" viewBox="0 0 1200 450">
<defs>
<linearGradient id="grad1" x1="0" y1="0" x2="0" y2="450" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#9EAFD9" />
<stop offset="0.5" style="stop-color:#FFFFFF" />
<stop offset="1" style="stop-color:#E1E183" />
</linearGradient>
</defs>
<rect width="1200" height="450" style="fill:url(#grad1);stroke-width:0" />
</svg>
1) the colors are in the wrong order
2) the gradient should be from top to bottom. But is only on a small area.
Any suggestions how to make a smooth gradient? Without "userSpaceOnUse" it is even worse...