文本和下划线颜色不一

程序代码 程序代码
<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>


下划线是虚线


程序代码 程序代码
<style type="text/css">
<!--
a:link {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: dotted;
    border-left-style: none;
    border-top-color: #000000;
    border-right-color: #000000;
    border-bottom-color: #000000;
    border-left-color: #000000;
}
a:visited {
    text-decoration: none;
}
a:active {
    text-decoration: none;
}
-->
</style>
<a href=#>CNBRUCE</a>


一个页面用几种超级连接样式:还要注意顺序,visited 要在 hover 之前。


程序代码 程序代码
<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>
posted on 2007-01-24 13:17  mbskys  阅读(126)  评论(0)    收藏  举报