How to disable the html button highlight color in mobile view [closed]
You can use -webkit-tap-highlight-color: rgba(0,0,0,0);
or -webkit-tap-highlight-color: transparent;
This will not work on Firefox for mobiles.
For more info, check this.
Update: You can try to fake this by adding styled active :active
and focus :focus
CSS states.
Be sure to change the background color to the default. I'm using blue
so you can see how it behaves:
.link {
text-decoration:none;
background: lightblue;
border-radius: 20px;
padding: 1rem 3rem;
color: white;
font-weight: 800;
}
.link:active {
background: blue;
}
.link:focus {
background: blue;
}
<a href="#" class="link">Click Me!</a>