remove grey background on link clicked in ios safari / chrome / firefox

后端 未结 2 600
心在旅途
心在旅途 2020-12-02 08:52

When you click (touch) a link in Safari (or chrome or firefox) for iOS, you get a grey background behind link (only while you\'re holding it). Is there a way to remove this

2条回答
  •  盖世英雄少女心
    2020-12-02 09:14

    Latest versions of iOS are ignoring RGBA colors for some reason.

    To remove it, I ended up having to use the following:

    -webkit-tap-highlight-color: transparent;
    

    As documented here: https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color

提交回复
热议问题