当您点击(触摸)iOS中的Safari中的链接时,您会在链接后面留下一个灰色背景(仅在您握住它时)。有没有办法使用CSS删除iOS Safari的此功能? 请参见下面的示例图片:解决方法 Web
...当您点击(触摸)iOS中的Safari中的链接时,您会在链接后面留下一个灰色背景(仅在您握住它时)。有没有办法使用CSS删除iOS Safari的此功能?
请参见下面的示例图片:
.解决方法
. Webkit有一个特定的样式属性:-webkit-tap-highlight-color。复制者:http://davidwalsh.name/mobile-highlight-color–
/* light blue at 80% opacity */html { -webkit-tap-highlight-color: rgba(201,224,253,0.8);}/* change it for a div that has a similar background-color to the light blue tap color */.blueDiv { -webkit-tap-highlight-color: rgba(251,185,250,0.9);}
如果您想要删除突出显示完全 –
.myButton { -webkit-tap-highlight-color: rgba(0,0);}. ..