-webkit-tap-highlight-color is not working

Viewed 17873

I am trying to remove tap highlight color. But it is not working mobile. When i am trying to see using inspect element on pc it is also not showing.

My css is

button, button:hover, li:hover, a:hover , li , a , *:hover, *
{
  -webkit-tap-highlight-color: rgba(0,0,0,0); 
}

is there any error on my css..

5 Answers

My divs appeared to get highlighted, even though I used the necessary CSS tags to remove the highlight color. This only happened in Android WebView API 26.

After a lot of tinkering, it turned out that this had nothing to do with the highlight color. The div's transparent background color was briefly rendered fully opaque as it started a transition. To fix this, I simply replaced this transparent color:

div.style.background = "rgba(0, 0, 255, .05)";

... with a similar opaque color:

div.style.background = "rgba(246, 246, 255, 1)";

I injected this code into a <style> tag on <header> on a Muse website and worked perfectly for me:

   * {
        -webkit-touch-callout:none;               
        -webkit-text-size-adjust:none;          
        -webkit-tap-highlight-color:rgba(0,0,0,0);
        -webkit-user-select:none;                 
    }
Related