<style type="text/css">
body{
background-color:#999;
}
#menu{
font-size:16px;
width:140px;
margin:0 auto;
border:solid 1px #ccc;

}
#menu a,#menu a:visited{
text-decoration:none;
text-align:center;
color:#c00;
display:block;
padding:4px;
background-color:#fff;
border:solid 1px #fff;
height:lem;
position:relative;             //相对连接的定位
}
#menu a:hover{
border-color:#c00;
}
#menu a:hover span{
display:block;
height:0px;
width:0px;
border:solid 8px #fff;
top:4px;
position:absolute;


}
#menu a:hover span.left{
border-left-color:red;
left:8px;

}
#menu a:hover span.right{
border-right-color:red;
right:8px;
}
</style>
</head>

<body>
<div id="menu">
<a href="#"><span class="left"></span>Home<span class="right"></span></a>
<a href="#"><span class="left"></span>Contact Us<span class="right"></span></a>
<a href="#"><span class="left"></span>Web Dev<span class="right"></span></a>
<a href="#"><span class="left"></span>Web Design<span class="right"></span></a>
<a href="#"><span class="left"></span>Map<span class="right"></span></a>
</div>
</body>
</html>

posted on 2011-09-29 10:51  小尚  阅读(735)  评论(0编辑  收藏  举报