where do i put this stylecodes?
<radialGradient gradientUnits="objectBoundingBox" r="100%" cy="50%" cx="50%" id="rgrad_group_43">
<stop style="stop-color:rgb(0, 255, 244); stop-opacity:1" offset="0%"/>
<stop style="stop-color:rgb(0, 74, 255); stop-opacity:1" offset="90%"/>
<stop style="stop-color:rgb(46, 60, 208); stop-opacity:1" offset="100%"/>
</radialGradient>
<style type="text/css">
svg rect { fill:transparent;}
svg g { fill:url(#rgrad_group_43); }
</style>
When i put the code in the body, no svgs on my page where styled. So i must put it into an SVG tag, right?
<svg>
<radialGradient gradientUnits="objectBoundingBox" r="100%" cy="50%" cx="50%" id="rgrad_group_43">
<stop style="stop-color:rgb(0, 255, 244); stop-opacity:1" offset="0%"/>
<stop style="stop-color:rgb(0, 74, 255); stop-opacity:1" offset="90%"/>
<stop style="stop-color:rgb(46, 60, 208); stop-opacity:1" offset="100%"/>
</radialGradient>
<style type="text/css">
svg rect { fill:transparent;}
svg g { fill:url(#rgrad_group_43); }
</style>
</svg>
It works but is this correct/valid?
No version="1.1"
, no xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
no viewBox="0 0 50 50"
and no xml:space="preserve"
here is a demo
https://jsfiddle.net/qcmxryay/