HTML and CSS Reference
SHADOWS AND FANCY FILLS
So far, when you've drawn lines and filled shapes on the
canvas, you've used solid colors. And while there's cer-
tainly nothing wrong with that, ambitious painters will
be happy to hear that the canvas has a few fancier draw-
ing techniques. For example, the canvas can draw an art-
fully blurred shadow behind any shape. Or, it can fill a
shape by tiling a small graphic across its surface. But the
canvas's fanciest painting frill is almost certainly gradi-
ents , which you can use to blend two or more colors into
a kaleidoscope of patterns.
In the following sections, you'll learn to use all these fea-
tures, simply by setting different properties in the can-
vas's drawing context.