Issue
I'm trying to get rid of the default button styling while the button is pressed. Inactive it looks like this:
On tap it looks like this:
The border appears slightly after the click and disappears shortly and disappears after a splitsecond. I don't manage to remove the it however. The code looks like this:
HTML:
<button>This is a button</button>
CSS:
button:active {
border: none !important;
background: none !important;
}
Because the border appears slightly after the tap, it would make sense that it isn't targetable with button:active
. What would be the right way to remove all feedback on tap?
Solution
Found the solution, in case anyone has the same problem:
button {
-webkit-tap-highlight-color: transparent;
}
If that doesn't work for you try adding !important
like this:
button {
-webkit-tap-highlight-color: transparent !important;
}
Answered By - lukaskupfing
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.