HTML and CSS Reference
In-Depth Information
gr
.
addColorStop
(
1
,
'rgb(255,0,0)'
);
// Use the gradient for the fillStyle.
context
.
fillStyle
=
gr
;
context
.
fillRect
(
0
,
0
,
200
,
200
);
}