<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html charset=utf-8" />
<title>test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script>
$(function(){
$("#div1").hover(function(){
$(this).find("span").show()
},function(){
$(this).find("span").hide()
})
})
</script>
<style>
#div1 {width:200px height:200pxposition:relativeborder:1px solid #dddmargin:0}
#div1 img{ width:200px height:200px}
#div1 span{ position:absolute top:0 left:0 width:100% height:100% display:none background:rgba(0,0,0,.3) z-index:1 color:#FFF}
</style>
</head>
<body>
<div id="div1">
<img src="http://img2.niushe.com/upload/201306/26/11-51-25-86-59983.jpg" />
<span>这里是文字文字</span>
</div>
</body>
</html>