<html>
<head>
<title>Lis.html</title>
<style type="text/css">
<!--
.a{
background:#ffffff;
filter: Alpha(opacity=50);
width:200px;
height:230px;
position:absolute;
border-right:1px solid #0066FF;
border-bottom:1px solid #0066FF;
border-top:1px solid #0066FF;
border-left:1px solid #0066FF; }
.a1
{
height:200px;}
.a2
{
background:#0066FF;
filter: Alpha(opacity=80);
height:30px;}
-->
</style> <script>
function a()
{
document.getElementById("f").style.display=""
document.getElementById("f").style.left=event.clientX+8
document.getElementById("f").style.top=event.clientY+18
}
function b()
{
document.getElementById("f").style.display="none"
document.getElementById("e").border="0" }
$=function (id){return document.getElementById(id);}
</script>
</head>
<body>
<img style="cursor:hand;" id="e" src="http://mat1.qq.com/ent/upday2008/06184.jpg" width="328" height="240" border="0" onMouseMove="a()" onmouseout="b()"/>
<div id="f" class="a"> 点到猪的头像了
<div id="f1" class="a1"> </div>
<div id="f2" class="a2"> </div>
</div>
</body>
自己看吧
<head>
<title>Lis.html</title>
<style type="text/css">
<!--
.a{
background:#ffffff;
filter: Alpha(opacity=50);
width:200px;
height:230px;
position:absolute;
border-right:1px solid #0066FF;
border-bottom:1px solid #0066FF;
border-top:1px solid #0066FF;
border-left:1px solid #0066FF; }
.a1
{
height:200px;}
.a2
{
background:#0066FF;
filter: Alpha(opacity=80);
height:30px;}
-->
</style> <script>
function a()
{
document.getElementById("f").style.display=""
document.getElementById("f").style.left=event.clientX+8
document.getElementById("f").style.top=event.clientY+18
}
function b()
{
document.getElementById("f").style.display="none"
document.getElementById("e").border="0" }
$=function (id){return document.getElementById(id);}
</script>
</head>
<body>
<img style="cursor:hand;" id="e" src="http://mat1.qq.com/ent/upday2008/06184.jpg" width="328" height="240" border="0" onMouseMove="a()" onmouseout="b()"/>
<div id="f" class="a"> 点到猪的头像了
<div id="f1" class="a1"> </div>
<div id="f2" class="a2"> </div>
</div>
</body>
自己看吧
通过document.getElementById("ID").style.display="";来显示或者
document.getElementById("ID").style.zIndex = 数值;
来显示和隐藏