HTML and CSS Reference
In-Depth Information
Figure 2-31. A complex radial gradient
As with the linear gradients, we can also apply the radial gradients to complex shapes.
Example 2-23 takes an arc example from earlier in this chapter but applies a radial gradient to
create Figure 2-32 .
Example 2-23. A radial gradient applied to a circle
function
function drawScreen () {
var
var gr = context . createRadialGradient ( 50 , 50 , 25 , 100 , 100 , 100 );
Search WWH ::




Custom Search