简体   繁体   English

当单击Web视图中html中的链接时,如何防止文本变色? (Android)

[英]How do I keep the text from changing color when a link in html in a webview is clicked? (Android)

I have almost no experience with html and am only using a WebView to load a local Word doc converted to html that serves as the FAQ in my app. 我几乎没有使用html的经验,仅使用WebView加载转换为html的本地Word文档,该doc在我的应用程序中用作常见问题解答。 Items in the table of contents can be clicked to jump to a FAQ item. 可以单击目录中的项目以跳至FAQ项目。

Currently the table of contents links turn purple when they've been clicked. 当前,单击目录链接会变为紫色。 Can I turn off this behavior so that the links stay blue? 我可以关闭此行为以使链接保持蓝色吗?

If web view is navigating to website that you own, then you can change its CSS like 如果网络视图导航到您拥有的网站,则可以更改其CSS,例如

a:visited{
   color : #0000FF;
}

else you can't change its color. 否则您将无法更改其颜色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM