求大神啊,鼠标点击DIV层在IE6显示不出来啊!
看源代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title>访问页面不存在</title>
<style>
*{margin:0;padding:0;}
.nav{ width:200px; margin:0 auto; background:#fff;}
.nav ul{ width:200px;}
.nav li{ position:relative; width:200px;color:#fff; line-height:22px; background:#333; overflow:hidden; display:block;}
.nav li a{ color:#FFF;}
.nav li div{ display:none;}
.nav li:hover div{ display:block;position:relative;top:0;left:0; margin-top:0px;z-index:99;background:#903;color:#000;width:200px;}
</style>
</head>
<body>
</div>
<div class="nav">
<ul>
<li><a href="#">219823987921982398792198239879</a>
<div>wqwqww<br />
111111<br />
111111
</div>
</li>
</ul>
</div>
</body>
</html>
[解决办法]
楼主 ie上 就a标签支持:hover类,要兼容得用js来做
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><head><title>访问页面不存在</title><style>*{margin:0;padding:0;}.nav{ width:200px; margin:0 auto; background:#fff;}.nav ul{ width:200px;}.nav li{ position:relative; width:200px;color:#fff; line-height:22px; background:#333; overflow:hidden; display:block;}.nav li a{ color:#FFF;}.nav li div{ display:none;}.nav li .cur { display:block;position:relative;top:0;left:0; margin-top:0px;z-index:99;background:#903;color:#000;width:200px;}</style></head><body> </div> <div class="nav"> <ul> <li><a href="#">219823987921982398792198239879</a> <div>wqwqww<br /> 111111<br /> 111111 </div> </li> </ul> </div> <script> function $t(name, cot){ cot = cot || document; return cot.getElementsByTagName(name); } var lis = $t('li'); for(var i=0,len = lis.length; i<len; i++){ lis[i].onmouseover = function(){ $t('div',this)[0].className = 'cur'; } lis[i].onmouseout = function(){ $t('div',this)[0].className = ''; } } </script></body></html>