Monday, May 14, 2012

HTML5 - Prevent that green highlight on an Android touch event

The Android operating system puts a green highlight around certain items when they are selected. Now, if you are creating, say, a quiz on the HTML5 canvas, you don't want that. What's more, I believe the iPad displays an orange highlight.

To get rid of all these nuisances, put this line of code in canvas element



-webkit-tap-highlight-color:rgba(0, 0, 0, 0);

No comments:

Post a Comment