【问题标题】:Background-size IE work around issue, duplicates image?背景大小的 IE 解决方法问题,重复图像?
【发布时间】:2013-03-11 11:56:21
【问题描述】:

我一直在努力让我的网站针对 IE8 和更早版本进行优化,并且我一直在 css 中使用大量 Background-size 来调整在 IE 中弄乱了尺寸的图像...

我得到了IE (filter) 解决方法,但我的问题是,现在图像出现在彼此之上两次,-(在解决之前和之后)。我的css如下:

#kompetancer table tr td #os_icon {
background: url(images/os_icon.png) no-repeat;
display: block;
width: 90px;
height: 90px;
position: absolute;
background-size: contain;
-webkit-background-size:contain;
-moz-background-size:contain;
-o-background-size:contain;
-ms-background-size:contain;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/wp-content/themes/theme-name/images/os_icon.png', sizingMethod='scale');
-ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/wp-content/themes/theme-name/images/os_icon.png', sizingMethod='scale');
}

【问题讨论】:

    标签: internet-explorer duplicates css


    【解决方案1】:

    您应该为 IE8 使用 JS polyfill,例如 background-size-polyfill :-)

    【讨论】:

      猜你喜欢
      • 2014-09-27
      • 2013-06-18
      • 2012-08-25
      • 2017-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-28
      相关资源
      最近更新 更多