<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body><div id="t" style="border:1px solid #000; position:absolute; width:600px; height:500px; left:0; top:0;">
</div><div style="width:200px; height:50px; background:#F00;" onClick="alert('1')"></div>
</body>
</html>ie6有没有方法不隐藏的情况下使红色div能被点击
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body><div id="t" style="border:1px solid #000; position:absolute; width:600px; height:500px; left:0; top:0;">
</div><div style="width:200px; height:50px; background:#F00;" onClick="alert('1')"></div>
</body>
</html>ie6有没有方法不隐藏的情况下使红色div能被点击
</div>加上 z-index:-1;
2.就是设置<div style="width:200px; height:50px; background:#F00;position:relative;z-index:10;" onClick="alert('1')"></div>
3.可以也把<div style="width:200px; height:50px; background:#F00;position:absolute;" onClick="alert('1')"></div>
设置成position:absolute;
我需要插入元素到div并且显示在前面的
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body><div style="border:1px solid #000; position:absolute; width:600px; height:500px; left:0; top:0; z-index:-1;">
<div style="width:200px; height:50px; background:#00F;"></div></div><div style="width:200px; height:50px; background:#F00;" onClick="alert('1')"></div>
</body>
</html>如果能让蓝色div在最上面就行了
而且红色div也只是例子
我要解决的是所有被遮盖元素的鼠标事件问题
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body><div style="border:1px solid #000; position:absolute; width:600px; height:500px; left:0; top:0;">
<div style="width:200px; height:50px; background:#00F;"></div></div><div style="width:200px; height:50px; background:#F00;">
<div style="width:200px; height:50px;filter:Alpha(Opacity=0);position:relative;z-index:100;background:yellow" onClick="alert('1')"></div>
</div>
</body>
</html>
你可以把透明div作为红色的子元素,这样定位也容易,这个是我刚调的,滤镜查了半天,嘿嘿!
我正在研究,他和jquery的区别有那些,如果你知道的话,帮我分析下吧!