1.【IE CSS Bug系列】IE6&IE7图片链接无效

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>IE6&IE7图片链接无效</title>
<style>
    html,body {
        padding: 0;
        margin: 0;
    }

    .m-box a { display: block; width: 270px; height: 129px; }
    .m-box a img { border: 0 none; }
    .m-box a span { *zoom: 1; }

    .m-fix a span { position: relative; z-index: -1; }
</style>
</head>
<body>
<h2>BUG复现</h2>
<p>触发条件:特定的嵌套(a>内联元素>img)</p>
<div class="m-box">
    <a href="#">
        <span>
            <img src="http://www.baidu.com/img/bdlogo.gif" alt="百度一下,你就知道"/>
        </span>
    </a>
</div>

<h2>BUG修复</h2>
<p>解决方案:给这个内联元素设置position: relative; z-index: -1;</p>
<div class="m-box m-fix">
    <a href="#">
        <span>
            <img src="http://www.baidu.com/img/bdlogo.gif" alt="百度一下,你就知道"/>
        </span>
    </a>
</div>
</body>
</html>
View Code

相关文章:

  • 2021-10-18
  • 2021-10-05
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2022-02-05
猜你喜欢
  • 2021-12-31
  • 2022-01-28
  • 2022-02-11
  • 2022-01-02
  • 2021-09-01
  • 2022-12-23
  • 2021-10-07
相关资源
相似解决方案