![]() |
VOOZH | about |
The canvas strokeStyle property is used to set or return the stroke of color, gradient, or pattern used in the drawing. Syntax:
context.strokeStyle=color|gradient|pattern;
Property Value:
Example 1: This example uses canvas strokeStyle property to set the stroke color to green.
Output: 👁 Image
Example 2: This example uses canvas strokeStyle property to set the stroke color using linear gradient.
Output: 👁 Image
Supported Browsers: The browsers supported by canvas strokeStyle property are listed below: