<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.body{
position:absolute;
top:250px;
right:500px;
background-image: url(./sed.jpg);
background-repeat: no-repeat;
height:400px;
width:700px;
}
.body:hover{
background-image: url(./sed.jpg);
opacity:0.6 ;
background-image: url(./arr.png);
opacity:0.6 ;
background-position:center ;
background-repeat: no-repeat;
background-color: black;
opacity:0.6 ;
}
</style>
</head>
<body>
<img class="body">
</img>
</body>
</html>
<!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>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.nav {
height: 40px;
border-bottom: 1px solid #ccc;
}
ul {
list-style: none;
width: 1200px;
margin: 0 auto;
}
ul li {
float: left;
width: 20%;
height: 40px;
border-right: 1px solid #ccc;
box-sizing: border-box;
text-align: center;
line-height: 40px;
}
ul .last {
border-right: none;
}
ul li a {
display: block;
height: 40px;
text-decoration: none;
color: #000;
}
ul li .app {
position: relative;
}
ul li .app .code{
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 40px;
border: 1px solid #ccc;
}
ul li .app .code:hover{
position:absolute;
background-image: url(./code.jpg);
background-repeat: no-repeat;
top:30px;
right:0px;
}
</style>
</head>
<body>
<div class="nav">
<ul>
<li><a href="#">我要投资</a></li>
<li><a href="#">平台介绍</a></li>
<li><a href="#">新手专区</a></li>
<li><a href="#" class="app">手机微金所<img src="./images/code.jpg" alt="" class="code"></a></li>
<li class="last"><a href="#">个人中心</a></li>
</ul>
</div>
</body>
</html>
明天要考试,写得拉了(课上的豪言壮语如同回旋镖般抽回了我的脸上)