鼠标移入前
鼠标移入时显示的效果,
<div class="parent">
<div class="child">
移入显示我
</div>
</div>
.parent {
position: relative;
width:100px;
height:100px;
background:blue;
}
.child {
position: absolute;
left:0;
top:0;
visibility: hidden;
padding:5px;
background:pink;
border:1px solid #ccc;
}
.parent:hover > .child {
visibility: visible;
}