访问时禁用锚标记的颜色更改 [英] Disable color change of anchor tag when visited

查看:98
本文介绍了访问时禁用锚标记的颜色更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

访问时必须停用锚标记的颜色更改。我做到了这一点:

  a:visited {color:grey} 

(访问前该链接为灰色)。但是,这是一种在链接访问后明确声明颜色的方式,这又是一种颜色变化。



如何在访问时停用锚标记的颜色变化而不做任何明确的颜色更改? 方案

你不能,你只能风格访问状态。



对于其他人找到这个,确保你有他们在正确的顺序:
$ b

a {color:#FF0000;} / *未访问链​​接* /
a:visited {color:#00FF00;} / * visited链接* /
a:hover {color:#FF00FF;} / * mouse over link * /
a:active {color:#0000FF;} / *选定的链接* /


I have to disable color change of anchor tag when visited. I did this:

a:visited{ color: gray }

(The link is gray in color before visited). But this is a way where I explicitly state the color after the link is visited, which is again a color change.

How can i disable color change of anchor tag when visited without doing any explicit color changes?

解决方案

You can't, you can only style the visited state.

For other people find this, make sure that you have them in the right order:

a {color:#FF0000;}      /* unvisited link */
a:visited {color:#00FF00;}  /* visited link */
a:hover {color:#FF00FF;}  /* mouse over link */
a:active {color:#0000FF;}  /* selected link */

这篇关于访问时禁用锚标记的颜色更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆