22

In an HTML 5 site a user, who's surfing through a mobile device, clicks a link.
The browser draws a box (rectangle) as a feedback (in addition to a sound).
Browser might mean Android 2.3's stock browser, or Opera Mobile.

Made some research about it but really, no (clear) solution.

I'd like to avoid this (blue) box. At least for iPhone and Android based devices. Any idea?

P.S I'm also using jQuery

Poni
  • 11,061
  • 25
  • 80
  • 121

3 Answers3

47

This is a duplicate of: Can I remove Android default link styling in webview and iPad Safari: How to disable the quick blinking effect when a link has been hit.

The answer being: add this CSS

* { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
Soviut
  • 88,194
  • 49
  • 192
  • 260
Brenton Fletcher
  • 1,280
  • 10
  • 15
24

I'm +1 to an answer, provided by bloopletech. But if you'd like to have this trick worked in an android native browser (Android Browser), use next:

* { 
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -moz-tap-highlight-color: rgba(0, 0, 0, 0);
}
Stanislav Terletskyi
  • 2,072
  • 20
  • 17
-1

The blue outline you see on link is the result of an 'outline'. To turn it off set:

outline: none;

Not sure why this has not yet been answered correctly.

JoeFlash
  • 74
  • 1
  • 3