<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
a{
text-decoration: none;
}
#a1{
display: inline-block;
width: 120px;
height: 58px;
background-image: url("../images/images/bg1.png");
text-align: center;
line-height: 58px;
}
#a2{
display: inline-block;
width: 120px;
height: 58px;
background-image: url("../images/images/bg2.png");
text-align: center;
line-height: 58px;
}
#a3{
display: inline-block;
width: 120px;
height: 58px;
background-image: url("../images/images/bg3.png");
text-align: center;
line-height: 58px;
position: relative;
}
#a3 img{
display: none;
position: absolute;
bottom: -130px;
left: 0px;
}
#a4{
display: inline-block;
width: 120px;
height: 58px;
background-image: url("../images/images/bg4.png");
text-align: center;
line-height: 58px;
}
#a1:hover{
background-image: url("../images/images/bg5.png")
}
#a2:hover{
background-image: url("../images/images/bg6.png")
}
#a3:hover{
background-image: url("../images/images/bg7.png")
}
#a3:hover img{
display: block
}
#a4:hover{
background-image: url("../images/images/bg8.png")
}
</style>
</head>
<body>
<a href="#" id="a1">五彩导航</a>
<a href="#" id="a2">五彩导航</a>
<a href="#" id="a3">五彩导航 <img src="../images(1)(1)/images/code.jpg" alt=""></a>
<a href="#" id="a4">五彩导航</a>
</body>
</html>
实现场景:
文章来源:https://uudwc.com/A/DzX2a
文章来源地址https://uudwc.com/A/DzX2a