自适应的斜角水平菜单

<!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>
<style type="text/css">
#menu
{
font-family
:Arial, Helvetica, sans-serif;
font-size
:14px;
}

#menu a,#menu a:visited
{
display
:block;
text-decoration
:none;
float
:left;
color
:#fff;
background-color
:#c00;
padding
:6px;
margin
:1px 0 0 1px;
position
:relative;
}

#menu a .corner
{
position
:absolute;
height
:0px;
width
:0px;
overflow
:hidden;
border-bottom
:solid 6px #c00;
border-left
:solid 6px #fff;
top
:0px;
left
:0px;
}

#menu a:hover
{
background-color
:#f90;
color
:#333;
}

#menu a:hover span.corner
{
border-bottom
:solid 6px #f90;
}

</style>
</head>

<body>
<div id="menu">
    
<href="#"><span class="corner"></span>Home</a>
    
<href="#"><span class="corner"></span>Contact</a>
    
<href="#"><span class="corner"></span>Web Dev</a>
    
<href="#"><span class="corner"></span>Web Design</a>
    
<href="#"><span class="corner"></span>Map</a>
</div>
</body>
</html>
posted @ 2008-06-14 10:45  单车骑客  阅读(197)  评论(0编辑  收藏  举报