<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width= , initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>综合案例-五彩导航</title>
<style>
.nav a {
/* 转换为块元素 */
display: inline-block;
background-color: pink;
width: 120px;
height: 58px;
text-align: center;
line-height: 58px;
/* 尖角减去10像素 */
color: #ffffff;
text-decoration: none;
}
.nav .bg1 {
background: url(image/aa.jpg) no-repeat;
}
.nav .bg1:hover {
background-image: url(image/chuanqi.jpg);
}
</style>
</head>
<body>
<div class="nav">
<a href="#" class="bg1">五彩导航栏</a>
<a href="#">五彩导航栏</a>
<a href="#">五彩导航栏</a>
<a href="#">五彩导航栏</a>
<a href="#">五彩导航栏</a>
</div>
</body>
</html>