<style type="text/css">
a:link {
text-decoration: none;
color: #FF0000;
}
a:visited {
text-decoration: none;
color: #FF0000;
}
a:hover {
color: #000000;
text-decoration: underline;
}
a.c1:link {
text-decoration: none;
color: #FFFF00;
}
a.c1:visited {
text-decoration: none;
color: #FFFF00;
}
a.c1:hover {
color: #0000FF;
text-decoration: underline;
}
</style>
<body bgcolor="#CCCCCC">
<a href="http://www.cnbruce.com">普通样式</a> <br><br>
<a href="http://www.cnbruce.com" class="c1">样式C1</a>
</body>
</html>
==============================================
虚线这么来的:
a:hover {...
border-bottom-style: dotted;
...
}
=====================文本和下划线颜色不一
<style type="text/css">
<!--
a:link {text-decoration:none;height:0;color:#0000ff;}
a:hover{border-bottom:1px solid #000000; color:#ff0000;}
-->
</style>
</head>
<body>
<a href="http://www.cnbruce.com/zp/" class="f1">CNBRUCE</a>
</body>
本文详细介绍了如何使用CSS来设置网页中链接的各种样式效果,包括去除默认下划线、改变颜色及实现虚线下划线等技巧。
1246

被折叠的 条评论
为什么被折叠?



