CSS Hover SHOW/HIDE
by jpwo759
HTML
<div class="parent">
<div class="standard">
<p>Left column</p>
</div>
<div class="standard">
<p>Right column</p>
</div>
<div class="overlay"><strong>Overlay</strong> With lots of interest stuff to tell you</div>
</div>
CSS
.parent {
width: 200px;
height: 50px;
position:relative;
}
.standard {
float:left;
text-align:center;
width: 100px;
height: 50px;
background-color: green;
color:white;
}
.overlay {
background-color: black;
text-align:center;
color:white;
position: absolute;
top:0;
left:0;
width: 100%;
height: 100%;
opacity:0;
transition: opacity 500ms;
-webkit-transition: opacity 500ms;
z-index: 2;
}
.parent:hover .overlay {
opacity: .7;
}