【问题标题】:getting unitpngfix to work让 unitpngfix 工作
【发布时间】:2010-09-27 07:37:02
【问题描述】:

我正在尝试让 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 放在正确的位置并正确链接到等等,所以我只是不明白为什么它不起作用。

【问题讨论】:

    标签: css internet-explorer png


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        【解决方案3】:

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

        【讨论】:

          【解决方案4】:

          试试

          background-image: url(corner.png);
          

          【讨论】:

            猜你喜欢
            • 2012-05-25
            • 2012-11-06
            • 2014-03-11
            • 2016-04-29
            • 2013-02-09
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多