开发者

Can I remove Android default link styling in webview

开发者 https://www.devze.com 2023-01-09 11:38 出处:网络
When you click a link in开发者_开发百科 the Android browser, the target link area gets highlighted with an orange box by default.A longpress then opens up the context menu for link handling (copy, pas

When you click a link in开发者_开发百科 the Android browser, the target link area gets highlighted with an orange box by default. A longpress then opens up the context menu for link handling (copy, paste, new window, etc). Is there a way to disable either / both of these in webview? I'm using the highlight code in scriptaculous and the default android link styling is being laid over top of the effect.


This might be useful: How to Hide Android WebView Highlight Border

The answer being: add this CSS * { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }.

Hopefully it is.


The suggested solution sets the color as transparent black:

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

Simply specifying the color as transparent should work:

* {
  -webkit-tap-highlight-color: transparent;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消