var ctx = document.getElementById('canvas').getContext('2d');
grad = ctx.createLinearGradient(0,30,280,30);
grad.addColorStop(0.1, '#af8');
grad.addColorStop(0.5, '#fc0');
grad.addColorStop(1.0, '#faf');
ctx.fillStyle = grad;
ctx.fillRect(0,0,280,60)
ctx.fillStyle = '#a5f';
ctx.font = '30px arial';
ctx.fillText('Lucia Corporation',20, 40);
The above code will finish in like below:
No comments:
Post a Comment