HTML and CSS Reference
In-Depth Information
Text with Gradients and Patterns
We'vealreadyexploredthe fillColor and strokeColor propertiesoftheCanvascontextby
setting those values to CSS-compliant colors. However, those very same properties can be set
to refer to a few other objects defined in the Canvas API to create some stunning text effects.
The objects are:
Linear gradient
A linear color gradient with two or more colors
Radial gradient
A circular color gradient with two or more colors
Image pattern
An Image object used as a fill pattern
Search WWH ::




Custom Search