zoukankan      html  css  js  c++  java
  • IE中的zindex BUG问题

    问题:

    怎么父元素同是relative,子元素同是absolute层,在IE中z-index值小的排在值大的上面呢,其它浏览器则正常表现,有什么hack可以解决呢?
    HTML code



    <!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">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <style type="text/css">

    <!--

    .rela{

    position:relative;

    }

    #ffdiv{

    position:absolute;top:0px;left:0px;background-color:#FFC993;80px;height:150px;z-index:20;

    }

    #iobj{

    position:absolute;top:20px;left:20px;background-color:#D0FFA2;350px;height:300px;z-index:10;

    }

    -->

    </style>

    </head>

    <body>

    <div class="rela">

    <div id="ffdiv"></div>

    </div>

    <div class="rela">

    <div id="iobj"></div>

    </div>

    </body>

    </html>
    top,left不同是为了大家能看清我这个问题的层叠关系,你用IE和非IE浏览器就知道我所表述的问题现象了

     并非是#iobj盖住了#ffdiv,而是第二个.rela盖住了第一个.rela,在IE下,父元素没有指定z-index,子元素也是不可逾越的

    from:http://www.bhcode.net/article/20100610/10949.html
  • 相关阅读:
    在 XD 和 Axure 中使用 iconfont
    chartjs 曲线图 纪要
    js ajax 等的的一些纪要
    程序员的方向
    sqlserver 常用的练习50例子
    (function(){})()原理
    layer弹出层详解
    sqlserver 表值函数 保存使用
    关于批量下载线程池与信号机制的使用
    tp5.1 phpstudy composer 配置等
  • 原文地址:https://www.cnblogs.com/EWall/p/1880527.html
Copyright © 2011-2022 走看看