1.18. SVG gradient-radioactivity

发布时间 : 2025-10-25 13:33:32 UTC      

Page Views: 10 views

1.18.1. SVG radioactive gradient-

elements are used to define radioactive gradients.

labels must be nested in the on the inside. tag is an acronym for definitions that defines special elementssuch as gradients.

1.18.2. Example 1

Define a radioactive gradient from white to blue ellipse:

Here is the SVG code:

Example

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <radialGradient id="grad1" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> <stop offset="0%" style="stop-color:rgb(255,255,255); stop-opacity:0" /> <stop offset="100%" style="stop-color:rgb(0,0,255);stop-opacity:1" /> radialGradient> defs> <ellipse cx="200" cy="70" rx="85" ry="55" fill="url(#grad1)" /> svg>    

Code parsing: