css - IE后面有链接时下拉菜单消失

标签 css drop-down-menu

我正在使用 SimpleJqueryDropdown 菜单..

我在 IE7 和 8 上进行测试。当我将鼠标悬停在超链接上的下拉菜单上时,它会消失。 我试过 z-index 但它在 IE 中不起作用..

有人遇到过这个问题吗??

最佳答案

我以前遇到过这个问题。使用此 jquery 片段修复它。下面的代码片段解决了我在 this site 中的问题.

<!--[if lte IE 7]>
$(document).ready(function() {
  // lower the z-index to negative to fix the overlapping drop-down menu problem
  // for IE browsers only
  // the check for support of leading white space should give us false for IE 6-8
  if(!jQuery.support.leadingWhitespace){
    $('.post-header').css('z-index', -2);
    $('.container').css('z-index', -2);
  }
});
</script>
<![endif]-->

关于css - IE后面有链接时下拉菜单消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4507186/

相关文章:

javascript - 我可以将 div 对象从一个浏览器移动到另一个浏览器吗?

html - 使UL菜单显示在div内部和中央的顶部

html - Firefox 复选框样式问题

html - 两个堆叠的 div 和控制高度

jquery - Bootstrap 3 响应式下拉悬停菜单在移动设备上不起作用

html - 在 Chrome 中,如何呈现没有间隙的 Unicode block 字符?

html - Bootstrap 下拉菜单不起作用

基于点击事件的 jQuery 下拉菜单功能(隐藏帮助)

asp.net-mvc - 在复选框选择上启用/禁用 'DropDownListFor'

javascript - 是否选择下拉值的 JS 验证