最终实现效果:点击前蓝色,点击后其他颜色,刷新恢复蓝色
为什么我下面的代码不能实现这个呀,我看了代码好像没问题,请教大虾们帮我解困。<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
a:link.other {color:#000000;text-decoration:none} /* 未被访问的链接 没有下划线*/
a:visited.other {color:#cccccc;text-decoration:none} /* 已被访问过的链接 没有下划线*/
a:hover.other {color: #000000;text-decoration:none} /* 鼠标悬浮在上的链接 下划线为underline 上划线为overline 无下划线为none*/
a:active.other {color: #000000;text-decoration:none} /* 鼠标点中激活链接 没有下划线*/
</style>
</HEAD> <BODY>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr height="28">
<td class="other"><a href="WWW.126.COM">AAA</a> | </td>
<td class="other"><a href="WWW.BAIDU.COM" >BBB</a> | </td>
<td class="other"><a href="WWW.GOOGLE.CN" >CCC</a> | </td>
</tr>
</table>
</BODY>
</HTML>
为什么我下面的代码不能实现这个呀,我看了代码好像没问题,请教大虾们帮我解困。<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
a:link.other {color:#000000;text-decoration:none} /* 未被访问的链接 没有下划线*/
a:visited.other {color:#cccccc;text-decoration:none} /* 已被访问过的链接 没有下划线*/
a:hover.other {color: #000000;text-decoration:none} /* 鼠标悬浮在上的链接 下划线为underline 上划线为overline 无下划线为none*/
a:active.other {color: #000000;text-decoration:none} /* 鼠标点中激活链接 没有下划线*/
</style>
</HEAD> <BODY>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr height="28">
<td class="other"><a href="WWW.126.COM">AAA</a> | </td>
<td class="other"><a href="WWW.BAIDU.COM" >BBB</a> | </td>
<td class="other"><a href="WWW.GOOGLE.CN" >CCC</a> | </td>
</tr>
</table>
</BODY>
</HTML>
解决方案 »
- PHP函数应用
- 请问这是什么样的域名绑定法???
- dreamweaver 在onload 运行login user.htm发生了一下java script错误
- 从FCKeditor内容中中获取远程图片保存到本地?
- 当前目录没有写的权限,请将当前目录属性修改为:777
- 关于php+oracle的几个入门问题及求资料
- 关于&的操作符问题
- php用什么开发工具开发?新手!
- 地址重定向时对方无法抓取到HTTP_REFERER server variable是什么原因?
- 如何在表单提交后,出现错误需要返回填写表单页面时候传回已填写的数据?请教!!!
- php函数问题
- 为什么很多大论坛都用PHP程序写啊,我是搞java的
反正这个是有特定的顺序的,css权威指南上就有,可能记得有误a.other:visited 应该是这样写吧.
<HEAD>
<TITLE> New Document </TITLE>
<style>
a.other:link {color:blue;text-decoration:none} /* 未被访问的链接 没有下划线*/
a.other:visited {color:green;text-decoration:none} /* 已被访问过的链接 没有下划线*/
a.other:hover {color:yellow ;text-decoration:none} /* 鼠标悬浮在上的链接 下划线为underline 上划线为overline 无下划线为none*/
a.other:active {color:pink;text-decoration:none} /* 鼠标点中激活链接 没有下划线*/
</style>
</HEAD><BODY>
<a href="www.google.com" class="other" target="_blank">AAA </a>
</BODY>
</HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
a{color:#000;text-decoration:none} /* 未被访问的链接 没有下划线*/
a:hover{color:#515561;} /* 鼠标悬浮在上的链接 下划线为underline 上划线为overline 无下划线为none*/
a.hov {color:#515561;} /* 访问后 自定义灰色 没有下划线*/
</style>
</HEAD> <BODY>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr height="28">
<td class="other"> <a href="WWW.126.COM" class="" onclick="className='hov'" target="_black">AAA </a> | </td>
<td class="other"> <a href="WWW.BAIDU.COM" class="" onclick="className='hov'" target="_black" >BBB </a> | </td>
<td class="other"> <a href="WWW.GOOGLE.CN" class="" onclick="className='hov'" target="_black">CCC </a> | </td>
</tr>
</table>
</BODY>
</HTML>