Category Archives: html5

HTML5 Canvas Tutorial: Basic Mouse Interaction

HTML5 Canvas Tutorial: Introduction

In developing html5 apps there may come a time when we need to change the color or some other property of an element when the mouse is hovering over it. This is not as easy when using the (very powerful) html5 canvas as with images or svg objects because the entire html5 canvas is the object, therefore we need to add code to determine if the mouse is over an element and also to modify the element when this happens. In this simple html5 canvas tutorial you’ll see how to use JavaScript to do this. Continue reading