如何让鼠标点击过之后的链接字体颜色变化

css

让鼠标点击过后的链接字体、颜色发生变化,可以用css属性设置里的【a:visited 】属性


A伪类属性设置如下:

a:link { } /* 未访问的链接 */
a:visited { } /* 已访问的链接 */
a:hover { } /* 鼠标移动到链接上 */
a:active { } /* 选定的链接 */


代码示例如下:



<head>

<title>A伪类</title>
<style type="text/css">
a:link{ font-family:Verdana, Geneva, sans-serif; color:#000;}
a:visited{ font-family:"黑体"; color:#F00;}
</style>
</head>

<body>

<a href="#">点击过后,字体、颜色会变</a>
</body>
</html>


说明图如下:

温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-05-04
这个吗很简单。你在给连接加css样式。在未点击时设置成一种颜色,点击后令一种颜色就好了。
第2个回答  2012-07-02
<style type="text/css">
   <!--
   a:link { text-decoration: none;color: blue}
   a:active { text-decoration:blink}
   a:hover { text-decoration:underline;color: red}
   a:visited { text-decoration: none;color: green}
   -->
   </style>

  其中:
  a:link 指正常的未被访问过的链接;
  a:active 指正在点的链接;
  a:hover 指鼠标在链接上;
  a:visited 指已经访问过的链接;
  text-decoration是文字修饰效果的意思;
  none参数表示超链接文字不显示下划线;
  underline参数表示超链接的文字有下划线
相似回答