就你贴的这些代码测试ie7没问题,是不是你的img增加了什么样式了?

解决方案 »

  1.   


    版主可能没理解我的意思这个是我想要的效果,
    IE7下绝对定位的DIV层没有盖住旁边两个li的img图片
      

  2.   

    本帖最后由 showbo 于 2014-09-15 09:56:34 编辑
      

  3.   

    参考: Fixing IE z-index
    这是一个演示代码,但是不知道IE7打开是否正常。在你的页面里面使用下面的js代码试试$(function(){
        var zIndexNumber = 1000;
        // Put your target element(s) in the selector below!
        $(".gwtWrapInner ul li").each(function() {
            $(this).css('zIndex', zIndexNumber);
            zIndexNumber -= 10;
        });
        
        $(".gwtWrapInner ul li")
        .mouseenter(function(){
            $(this).children("div.gwtIntro").show();
        })
        .mouseleave(function(){
            $(this).children("div.gwtIntro").hide();
        });
    });
      

  4.   


    感谢版主,IE6下,你的代码是不是应该改成这样
    var liindex = 999;
    $(".gwtWrapInner ul li").each(function (index, el) { $(this).css('z-index', liindex--); })
    $(".gwtWrapInner ul li").mouseenter(function(){
    $(this).css("position","relative");
    $(this).children("div.gwtIntro").show();
    });
    $(".gwtWrapInner ul li").mouseleave(function(){
    $(this).css("position","static");
    $(this).children("div.gwtIntro").hide();
    });