canvas memo notes

 

MEMO

1. canvas tag width and height are set attribute sets, if the property is not css css property set size, Canvas is stretched label attributes example:.. Class, id, style, width, heigh ..... . CSS attributes such: style.width, style.height these.

 

Translucent gradient fill provided:

var lineGradient = context.createLinearGradient (0, 0, 0, 200);
lineGradient.addColorStop(0, 'rgba(182,255,218,0.5)');
lineGradient.addColorStop(1, 'rgba(252,133,255, 0.5)');
context.fillStyle =lineGradient

  

 

Guess you like

Origin www.cnblogs.com/xuange306/p/12059201.html