1

我正在尝试让 unitpngfix 工作,但我似乎无法让 png 显示在 IE6 中。

这是我的代码:

<html>
  <head>
    <style type="text/css">
      #boxouter {
        width: 12em;
        height: 12em;
        background: url(gradient.gif) #ffdf00 bottom repeat-x;
        position: relative;
        }
      #boxinnerbr {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 16px;
        height: 16px;
        background: url(corner.png);
        }      
    </style>
    <!--[if lt IE 7]>
            <script type="text/javascript" src="unitpngfix.js"></script>
    <![endif]-->
  </head>

  <body>
    <div id="boxouter">
      <div id="boxinnerbr"></div>
    </div>
  </body>
</html>

我在正确的位置有 clear.gif 并正确链接等,所以我无法理解为什么它不起作用。

4

4 回答 4

2

我也遇到了 unitpngfix 的一些问题,我真的不喜欢使用 [if lt IE 7] 和在 html 中嵌入样式。我发现这个jQuery 插件非常不显眼,并且适用于 IE6 中的 PNG 图像和 css 背景。

于 2008-12-17T11:41:50.457 回答
0

不是您问题的直接答案,但您可能想查看DD_belatedPNG。在我看来,这是最好的 PNG 修复程序。

于 2009-04-10T15:14:01.760 回答
0

两件事 1. 你没有 clear.gif 文件或 2. 如果你有它打开 unitpngfix.js 文件并检查第一行中设置的路径是否正确

于 2009-04-10T13:09:11.513 回答
-2

尝试

background-image: url(corner.png);
于 2008-12-26T23:12:12.830 回答