This code above is a simple example, I want to use opacity and absolute to build a drop down menu. When the mouse hover on the parent container, then the child content shows. But it doesn't work at all.
.child {
background-color:blue;
height:200px;
position:absolute;
top:50px;
opacity:0;
}
.parent {
position:relative
}
.parent:hover + .child {
opacity:1
}
<html>
<body>
<div class="parent">
<div class="child"></div>
</div>
</body>
</html>