ie6上的z-index问题 [英] problem with z-index on ie6
问题描述
Hy,
我在bug6上运行了几个小时,这不是唯一一个我锁定的,只能解决这个问题,我会终于安静了。
I run for several hours on a bug ie6, it was not the only one that I was locking it remains only to solve this one and I would finally be quiet.
我有一个我建立的垂直菜单,问题是第二级菜单与第一级的菜单不重叠,尽管z-index 。在FF下是无可挑剔的,在ie6它是公平的。
I have a vertical menu that I built, the problem is that the second level menu does not overlap with that of the first level despite the z-index. Under FF is impeccable, in ie6 it fair.
这是我的代码,如果你可以帮助你大大减轻:
here is my code, if you could help you relieve me greatly:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>
</head>
<style type="text/css">
<!--
* {
margin: 0;
padding: 0;
}
div#menu {
width: 100px;
}
div#menu ul {
padding: 0;
width: 100px;
border: 1px solid green;
margin: 0px;
background: yellow url();
position: absolute;
z-index: 1;
}
div#menu ul li {
position: relative;
list-style: none;
}
div#menu ul ul {
position: absolute;
top: 0px;
left: 10px;
display: block;
background: red url();
z-index: 999;
border: 1px solid black;
}
div#menu li a {
text-decoration: none;
}
//-->
</style>
<body>
<div id="menu">
<ul>
<li><a href="">menu 1</a></li>
<li><a href="">menu 2</a>
<ul>
<li><a href="">Sous menu 2.1</a></li>
<li><a href="">Sous menu 2.2</a></li>
</ul>
</li>
<li><a href="">menu 3</a></li>
<li><a href="">menu 4</a></li>
<li><a href="">menu 5</a></li>
</ul>
</div>
</body>
</html>
推荐答案
尝试此插件: http://docs.jquery.com/Plugins/bgiframe ,将工作!
try this plugin: http://docs.jquery.com/Plugins/bgiframe , will work!
usage:$('。your-dropdown-menu')。bgiframe();
usage: $('.your-dropdown-menu').bgiframe();
这篇关于ie6上的z-index问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!