html 链接的颜色变化: a.html 文件如下: <html> <head> < title>Hello world< /title> <link rel="stylesheet" type="text/css" href="b.css" /> <!-- 用于和外部的css文件进行关联--> </head> <body> <a href="http://www.google.com">Google</a> </body> </html> b.css 文件如下: a:link { color:blue; text-decoration: none /* 链接一开始没下划线*/ } /* 鼠标还没放到链接上的 链接颜色*/ a:visited{ color:green ; text-decoration: none } /* 访问过的颜色 */ a:hover{ color: red ; text-decoration: underline /* 鼠标放上去的时候有下划线*/ } /* 鼠标 放到链接上的颜色*/ a:active{ color: lime ; text-decoration:underline } /* 鼠标点链接没放开时的颜色*/ 来源:https://www.cnblogs.com/android-html5/archive/2011/12/28/2533687.html 标签 text-decoration