我有一个下拉式导航栏,当你将鼠标悬停在项目上时,下拉选项出现在IE7中,它们隐藏在滑块后面。
我尝试过z-index,但没有成功。此外,在菜单按钮和IE7中的第一个选项下也有一些间距。到目前为止,我还没有尝试解决这个问题,我主要关心的是让它显示在滑块内容的上方。
你可以在这里看到:http://www.condorstudios.com/stuff/temp/index.php
发布于 2012-08-15 01:55:00
将此代码添加到您的$(document).ready()处理程序:
var zi = 1000;
$('*').each( function() {
$(this).css('zIndex', zi);
zi -= 10;
});为了确保这只在IE7上执行,请将此添加到 <script>标记之外,但在<head>中
<!--[if IE 7]>
<script type="text/javascript">
$(document).ready(function() {
var zi = 1000;
$('*').each( function() {
$(this).css('zIndex', zi);
zi -= 10;
});
});
</script>
<![endif]-->发布于 2012-08-15 02:14:43
我解决了同样的问题recently here,所以下面是IE7的两个修复:
/* show menu above content */
#nav li {
display: block;
position: relative;
z-index: 1; // force IE to recognize stack at this point
}
/* normalize layout, IE7 not makes this automatically */
body,ul,li {
margin:0;
padding:0;
}https://stackoverflow.com/questions/11957470
复制相似问题