<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css</title>
<style>
body{text-align: center;
}
.center{margin-left: auto;
margin-right:auto;
width: 400px;
height:200px;
background:red;
position: relative;
}
ul{
list-style: none;
}
li{float: right;}
p{display: block;
width: 40px;
height: 40px;
line-height: 40px;
background: #ffffff;
border-radius:25px;
color: blue;
}
.yuan1{
position:relative;
width: 40px;
height: 40px;
/*background: blue;*/
bottom: -144px;
}
.yuan2{
position: relative;
width: 40px;
height: 40px;
bottom: -144px;
}
.div1{
position: absolute;
display: none;
width: 400px;
height: 200px;
background: yellow;
right: 0px;
bottom: 0px;
}
.div2{
display: none;
position: absolute;
width: 400px;
height: 200px;
background:blue;
bottom: 0px;
right: -40px;
}
.yuan1:hover .div1{
display: block;
}
.yuan2:hover .div2{
display: block;
}
</style>
</head>
<body>
<div class="center">
<ul>
<li>
<div class="yuan1">
<p>1</p>
<div class="div1"></div>
</div>
</li>
<li>
<div class="yuan2">
<p>2</p>
<div class="div2"></div>
</div>
</li>
</ul>
</div>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>css</title>
<style>
body{text-align: center;
}
.center{margin-left: auto;
margin-right:auto;
width: 400px;
height:200px;
background:red;
position: relative;
}
ul{
list-style: none;
}
li{float: right;}
p{display: block;
width: 40px;
height: 40px;
line-height: 40px;
background: #ffffff;
border-radius:25px;
color: blue;
}
.yuan1{
position:relative;
width: 40px;
height: 40px;
/*background: blue;*/
bottom: -144px;
}
.yuan2{
position: relative;
width: 40px;
height: 40px;
bottom: -144px;
}
.div1{
position: absolute;
display: none;
width: 400px;
height: 200px;
background: yellow;
right: 0px;
bottom: 0px;
}
.div2{
display: none;
position: absolute;
width: 400px;
height: 200px;
background:blue;
bottom: 0px;
right: -40px;
}
.yuan1:hover .div1{
display: block;
}
.yuan2:hover .div2{
display: block;
}
</style>
</head>
<body>
<div class="center">
<ul>
<li>
<div class="yuan1">
<p>1</p>
<div class="div1"></div>
</div>
</li>
<li>
<div class="yuan2">
<p>2</p>
<div class="div2"></div>
</div>
</li>
</ul>
</div>
</body>
</html>