<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>五彩导航</title>
<style>
a {
display: inline-block;
width: 120px;
height: 58px;
text-align: center;
color: white;
text-decoration: none;
line-height: 58px;
}
.head .a1{
background: url(images/bg1.png) no-repeat center center;
}
.head .a2{
background: url(images/bg2.png) no-repeat center center;
}
.head .a3{
background: url(images/bg3.jpg) no-repeat center center;
}
.head .a4{
background: url(images/bg4.png) no-repeat center center;
}
.head a:hover {
background: url(images/bg3.jpg);
}
</style>
</head>
<body>
<div class="head">
<a href="" class ="a1">五彩导航</a>
<a href="" class ="a2">五彩导航</a>
<a href="" class ="a3">五彩导航</a>
<a href="" class ="a4">五彩导航</a>
</div>
</body>
</html>
css案例练习:五彩导航
于 2022-03-05 17:12:35 首次发布