W3School TIY
编辑您的代码:
<!DOCTYPE html> <html> <head> <style> a:link {text-decoration:none;} /* 未被访问的链接 */ a:visited {text-decoration:none;} /* 已被访问的链接 */ a:hover {text-decoration:underline;} /* 鼠标指针移动到链接上 */ a:active {text-decoration:underline;} /* 正在被点击的链接 */ </style> </head> <body> <p><b><a href="../" target="_blank">这是一个链接</a></b></p> <p><b>注释:</b>为了使定义生效,a:hover 必须位于 a:link 和 a:visited 之后!!</p> <p><b>注释:</b>为了使定义生效,a:active 必须位于 a:hover 之后!!</p> </body> </html>
查看结果: