HTML5 Canvas Global Alpha Tutorial

Published on January 27th 2011 by Eric Rowell

To set the opacity of elements with the HTML5 Canvas, we can set the globalAlpha property of the canvas context to a real number between 0 and 1, in which 0 is fully transparent and 1 is fully opaque.

Live Demo and Editor new window

Author Bio

Eric Rowell

Eric Rowell 

Eric Rowell is the creator of KineticJS, the founder of MeteorCharts, the founder and chief editor of, the author of HTML5 Canvas Cookbook, and a senior web developer at LinkedIn. He really likes robots, and dreams of one day building his own Megazord.

Submit an Article

Hi there! Are you looking to promote your website or boost your brand? With nearly one million unique page views per month, HTML5 Canvas Tutorials is a great place to submit HTML5 canvas related articles to help meet your goals.

comments powered by Disqus