CSS3 Series: Multiple Columns

Even though this wonderful feature has been around for five years, it has yet to be implemented consistently across the major browsers. Hopefully, this will change soon. If you know a reason why this is so, please leave a comment. Thanks. The specification for CSS Multi-column Layout has 10 properties for CSS Multiple Columns. They […]

Continue reading

Graphing Data in the HTML5 Canvas Element Part IV Simple Pie Charts

In this post we will create a simple pie chart that is easy to feed data to. This example is coded for readability and not for optimized operation. All you need is a text editor like notepad and an HTML5 friendly browser (I’m using Firefox 3.6). <!doctype html> <html> <head> <meta charset=”UTF-8″ /> <title>Canvas Test</title> […]

Continue reading

HTML5 Web Storage, Using localStorage and sessionStorage Objects

Web storage started as part of the HTML5 spec for storing key-value pair data in web clients. It now has its own spec. There are other plans for storing databases that are structured and can be queried using SQL which are handled in a separate spec . Seeing the need for storing more key-value pair […]

Continue reading

Playing With CSS Transitions On Firefox 4 Beta 2

I saw the recent announcement by Paul Rouget that Firefox 4 beta 2 has support for CSS transitions and I thought it would be fun to play with it. Here is a demo with complete source code where I chained together a bunch of CSS transitions using the transitionend event to trigger the transitions sequentially. […]

Continue reading

Using Multiple HTML5 Canvases as Layers

DEMO Here’s our finished canvas with full source code. The reasons why you would want to layer multiple canvases on top of each other are many but they all have a common root. There is a requirement in the W3C definition of the 2d context… There is only one CanvasRenderingContext2D object per canvas, so calling […]

Continue reading

Slicing Spritemaps and Parallax Scrolling on the HTML5 Canvas

In this example we will look at slicing images with the drawImage() method of a 2d canvas context. We’ll use two images that are larger than the canvas to create a parallax scrolling effect that is common in 2d games and also another image as a spritemap consisting of three sprites to show how to […]

Continue reading

Graphing Data in the HTML5 Canvas Element Part III

This is post 3 of a multipart series of posts. All of the code to try this example for yourself is included here but much of it is explained in the previous posts. The first and second parts can be found here. Graphing Data in the HTML5 Canvas Element Part I Graphing Data in the […]

Continue reading

CSS 3.0 Series: The radial-gradient Object

Radial gradiants are on the cutting edge of CSS . We’re going to be looking at some examples of their use and their current capabilities. In the previous post in this series we looked at linear gradients. The WebKit implementation of the radial gradient is just an extension of their linear gradient function while Mozilla […]

Continue reading

Make a Maze Game on an HTML5 Canvas

UPDATE: 8-28-2013 This post is expanded on in the new post ‘Build Responsive Games For Mobile Phones, Tablets and Computers with HTML5 Canvas’ One of the best ways to learn how to program in any language is to make a game and then change the code to create different variations on the game. I learned […]

Continue reading