Search code examples
cssiospseudo-class

Deactivate default a:active behaviour on ios


When clicking on a link in safari with ios, a grey, semi-opaque rectangle appears around the link. Is it possible to deactivate this behaviour?


Solution

  • You certainly can, the simplest way would be to use the following:

    -webkit-tap-highlight-color: transparent;
            tap-highlight-color: transparent;

    You can also change it to whatever colour you would like. Keep in mind that indicating that a link has been pressed is helpful to the user.