<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>导航栏案例</title>
<style>
* {
margin: 0;
padding: 0;
}
li {
list-style: none;
}
.banner {
width: 760px;
height: 150px;
margin: auto;
background: url("banner.jpg");
}
.nov {
width: 760px;
height: 32px;
margin: auto;
background: url("nav_bg.jpg");
}
.nov li {
float: left;
}
.nov li a {
display: block;
text-decoration: none;
color: black;
width: 80px;
text-align: center;
height: 32px;
line-height: 32px;
font-size: 12px;
background: url("button1.jpg") no-repeat;
}
.nov li a:hover {
background: url("button2.jpg");
}
</style>
</head>
<body>
<div class="banner"></div>
<ul class="nov">
<li>
<a href="#">网站首页</a>
</li>
<li>
<a href="#">网站首页</a>
</li>
<li>
<a href="#">网站首页</a>
</li>
<li>
<a href="#">网站首页</a>
</li>
<li>
<a href="#">网站首页</a>
</li>
<li>
<a href="#">网站首页</a>
</li>
</ul>
</body>
</html>
前端学习(导航栏案例)
最新推荐文章于 2022-04-07 20:00:40 发布