iphone / css - how do I prevent black semi-transparent overlay on items when clicked

后端 未结 1 1160
情书的邮戳
情书的邮戳 2021-02-06 15:23

I am programming a mobile site and in iphone there is a noticeable semi-transparent black overlay on top of the image when you touch / hold on an clickable item. Has anyone expe

相关标签:
1条回答
  • 2021-02-06 16:14

    You can set the color of the tap highlighting with the CSS Property -webkit-tap-highlight-color:

    To disable highlighting use a color with alpha = 0.

    .yourLinkClass {
      -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    

    More info here: http://css-infos.net/property/-webkit-tap-highlight-color

    0 讨论(0)
提交回复
热议问题