css层次问题,很奇怪哟。
<HTML>
<HEAD>
<TITLE>Mouse Event</TITLE>
<style type="text/css">
<!--
.csssquare
{
position:absolute;
left:100;
top:100;
width:200;
height:200;
cursor:crosshair; <!--这里是十字形的鼠标-->
border:1 red solid;
z-index:0; <!--设置层次关系,但不管用-->
background-color:none;<!--当这个不为none时,是正确的-->
}
.cssgirl
{
position:absolute;
left:100;
top:100;
width:200;
height:200;
cursor:hand; <!--这里是手状的鼠标-->
z-index:-1; <!--层次-->
}
-->
</style>
</HEAD>
<BODY>
<img id="girl" name="girl" src="girl.bmp" class="cssgirl">
<div id="square" name="square" class="csssquare"></div>
</BODY>
</HTML>
问题:在explorer中,按道理,当我把鼠标移动到上面定义的区域时鼠标应该为十字形的,就是鼠标应该响应的是div。但实际上不是的,鼠标响应的是img。当给div的背景设置了一种颜色时,鼠标响应div。但是图片看不见了。
请告诉我原因?