CSS美化超链接

1、普通样式 

.link2:link {  /*初始样式*/
	color: #376d06;
	text-decoration: underline;
}
.link2:hover {   /*鼠标悬浮时*/
	color: #03F;
	text-decoration: none;
	margin-top: 1px;
	margin-left: 1px;
}
.link2:active { /*点击中*/
	color: #333;
	text-decoration: none;
	margin-top: 1px;
	margin-left: 1px;
}
.link2:visited {  /*点击后*/
	color: #606;
	text-decoration: overline;
}

2、按钮式超链接

@charset "utf-8";
/* CSS Document */
* {
	margin: 0px;
	padding: 0px;
	border: 0px;
}
body {
	font-family: 微软雅黑;
	font-size: 12px;
	color: #FFF;
	line-height: 20px;
	background-image: url(../images/6701.png);
	background-repeat: repeat-x;
	background-position: left -100px;
}
#box {
	width: 100%;
	height: 900px;
	background-image: url(../images/6702.jpg);
	background-repeat: no-repeat;
	background-position: center -100px;
	margin: 0px auto;
	padding-top: 30px;
}
#menu {
	width: 900px;
	height: 30px;
	margin: 0px auto;
}
#menu li {
	list-style-type: none;
	float: left;
}
#menu li a {
	width: 130px;
	height: 25px;
	line-height: 25px;	
	color: #FFF;
	text-align: center;
	margin-left: 4px;
	margin-right: 4px;
	float: left;
}
#menu li a:link,#menu li a:visited{
	border: solid 1px #0099FF;
	background-color: #FFF;
	color: #4287ca;
	text-decoration: none;
	filter: Alpha(Opacity=90);
}
#menu li a:hover {
	border: solid 1px #F90;
	background-color: #39F;
	color:#FFF;
	text-decoration: none;
	filter: Alpha(Opacity=90);
}

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>制作按钮式超链接</title>
<link href="style/8-67.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="box">
  <div id="menu">
    <ul>
      <li><a href="#">网站首页 Home</a></li>
      <li><a href="#">相关服务 Service</a></li>
      <li><a href="#">研究体系 Study</a></li>
      <li><a href="#">建筑规划 Architecture</a></li>
      <li><a href="#">景观作品 Landscape</a></li>
      <li><a href="#">联系我们 Contact</a></li>
    </ul>
   </div>
</div>
</body>
</html>

效果:

231244_o1Gr_2391658.png

 

转载于:https://my.oschina.net/u/2391658/blog/928008

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值