Why would a link in a UIWebView leave a gray box behind?

喜夏-厌秋 提交于 2019-12-06 07:31:43

Here it is...need to add this style statement to the link reference:

<a href=http://yourlink.com/ style = "-webkit-tap-highlight-color:rgba(0,0,0,0);">

Setting the alpha value (the last parameter to rgba) to 0 disables the tap highlight color.

Although this works, it feels like a hack. I really think the tap highlight should clear itself when my second loadHtmlString reloads new HTML code.

//Scott

You could add onclick="this.blur(); location.href=this.href;" to the link to remove the focus from the link.

I'm sure there's a better less hackish way, but this should work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!