html element on-click shading

0 views
Skip to first unread message

RipTide

unread,
Nov 25, 2007, 12:51:34 PM11/25/07
to iPhoneWebDev
Is there a way to remove/turn off the shading that occurs on a click
on an html element?

I am writing a game that uses the canvas element, and it's very
distracting for the entire game to shade and then unshade every time
the screen is tapped. This does not occur on the OS X Safari, so it
is probably a visual aid to help people see what it is they are about
to click on, but makes no sense in the context of my game.

Thanks
- Marcus Wu

John

unread,
Nov 26, 2007, 4:29:28 PM11/26/07
to iPhoneWebDev
Marcus,
> Is there a way to remove/turn off the shading that occurs on a click
> on an html element?

this is just a guess - hopefully they use CSS for this - something
like a:active{} with border-radius and background color - so, you
might try overriding these - but like I said, just a guess, and they
may actually use the canvas for this

john

∞ | millenomi

unread,
Nov 27, 2007, 6:25:05 AM11/27/07
to iPhoneWebDev


On Nov 25, 6:51 pm, RipTide <jett...@gmail.com> wrote:
> Is there a way to remove/turn off the shading that occurs on a click
> on an html element?

Always read Apple's docs -- all of them -- before venturing in using
any of their APIs. <http://developer.apple.com/documentation/
AppleApplications/Reference/SafariWebContent/AdjustingtheTextSize/
chapter_5_section_4.html>.

The gist of it is: -webkit-tap-highlight-color: rgba(0,0,0,0); is what
you want.

- ∞

Marcus Wu

unread,
Nov 28, 2007, 12:17:46 PM11/28/07
to iphone...@googlegroups.com
Thanks!  I for some reason couldn't find that through many searches.  I don't think I was looking for the right terminology... tap and highlight.
Reply all
Reply to author
Forward
0 new messages