<style>
#a
{
100%;
height:415px;
border:1px solid red;
position:relative;}
.aa
{
20%;
height:200px;
margin-left:4%;
float:left;
margin-top:5px;
background-color:#0F6;
position:relative;}
.b
{
100%;
height:200px;
position:relative;
background-color:#000;
opacity:0.4;
visibility:hidden;}
#w
{
position:relative;
top:-180px;
visibility:hidden;
}
</style>
</head>
<body>
<div id="a">
<div class="aa"><div class="b"></div></div>
<div class="aa"><div class="b"></div></div>
<div class="aa"><div class="b"></div></div>
<div class="aa"><div class="b"></div></div>
<div class="aa"><div class="b"></div></div>
<div class="aa"><div class="b"></div></div>
<div class="aa"><div class="b"></div></div>
<div class="aa"><div class="b"></div></div>
</div>
</body>
</html>
<script>
var all=document.getElementsByClassName("aa");
for(var i=0;i<all.length;i++)
{
all[i].onmouseover=function(){this.firstChild.style.visibility="visible"}
all[i].onmouseout=function(){this.firstChild.style.visibility="hidden"}
}