<style TYPE="text/css">
<!--
A:link {text-decoration:none}
A:visited {text-decoration:none}
A:hover {text-decoration:none}
A:active {text-decoration:none}
-->
</style>
将上面的代码放到网页源代码<head>与</head>之间,下划线就没有了。
text-decoration是文本装饰效果,有下划线就写underlink,没有就写none。
A:link后为普通情况下链接的效果
A:visited后为已访问链接的效果
A:hover后为鼠标悬停在链接上时的效果
A:active后为当前活动链接的效果
上面的设置中只是去除了下划线效果,不改变链接的颜色,如果想修改链接的颜色只要在括号内写上color值即可。如下:
<style TYPE="text/css">
<!--
A:link {color:black; text-decoration:none}
A:visited {color:black; text-decoration:none}
A:hover {color:red; text-decoration:none}
A:active {color:green; text-decoration:none}
-->
</style>
这样修改后未访问和已访问链接是黑色的,鼠标悬停时链接是红色的,活动链接是绿色的,同样都没有下划线。
此文章由 http://www.ositren.com 收集整理 ,地址为:
http://www.ositren.com/htmls/67591.html