stone310
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8"/>
<style>
#box {
width:200px;
height:200px;
margin: 300px;
}
#div1 {
width: 100%;
height: 80%;
background: red;
position: relative;
overflow: hidden;
}
#price{
width:100%;
height:20%;
position:relative;
background:blue;
color: white;
}
#div2 {
width: 100%;
height: 100%;
background: black;
opacity: 0.7;
position: absolute;
top: 70%;
transition: all 0.5s ease;
color: white;
}
#box:hover #div2 {
top:20px;
opacity:0.7;
}
</style>
</head>
<body>
<div id="box">
<div id="div1">
<div id="div2">
<h2>HELLO!</h2>
<p>文章正文文章正文文章正文文章正文文章正文文章正文文章正文文章正文文章正文</p>
</div>
</div>
<div id="price">$128.00</div>
</div>
</body>
</html>