Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. Learning the Basics of Canvas > Getting friendly with the canvas ele...

3.1. Getting friendly with the canvas element

Just like video and audio, the canvas element uses absolutely no external plug-ins or voodoo to do its thing. All you need is some HTML and a sprinkling of JavaScript courtesy of the 2d rendering context API. Don't worry if you don't have a clue what the 2d rendering context API is right now– you'll be an expert in it soon enough.

Using the canvas element is simple–and I mean really, really simple. The following code is all you need to get started with it:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial