一个页面用几种超级连接样式:还要注意顺序,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>

==============================================

看到一些网页的的连接下划线是虚线,这是怎么做的?

虚线这么来的:
a:hover {...
border-bottom-style: dotted;
...
}
 

solid /*實線框*/
dotted /*虛線框*/
double /*雙線框*/
groove /*立體內凸框*/
ridge /*立體浮凸框*/
inset /*凹框*/
outset /*凸框*/

=====================文本和下划线颜色不一

<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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值