1

hi i have looked to some questions here which have same subject as here but didnt understand how he fixed it with html as he said. and here but didnt understand how to implement it to work , anyway i have tried mine to test it but it doesnt seem to work.

    <style>
 .foo {
   font-size : 14px ;
   background-size: 832px 578px;
   background-image: url("al0-2.png");
   background-repeat: no-repeat;
   width: 831px;
   height: 590px;
   filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="al0-2.png",   
           sizingMethod="scale");
  -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='al0-2.png', 
           sizingMethod='scale')";
     }
   </style>

any help to fix this . im wanting to let background-size works good in all IE also as FF do

EDIT>

my html code

      <div class="foo" ></div>
4

1 回答 1

1

我做了这个小提琴供你试验。

它在 ie7/ff 中运行良好。

不过请注意,在 IE7 中,会有 2 个背景:1 个来自背景,1 个来自过滤器。您应该以某种方式删除背景(例如:条件注释)。

在您的代码中,如果没有显示图像,则可能是您的图像链接已损坏。

小提琴CSS:

#foo {
    border:2px solid red;

    font-size : 14px ;
    background-size: 832px 578px;
    background-image: url('/img/logo.png');
    background-repeat: no-repeat;
    width: 831px;
    height: 590px;    


    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
    src='/img/logo.png',
    sizingMethod='scale');

    -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(
    src='/img/logo.png',
    sizingMethod='scale')";
}
于 2012-11-14T22:34:57.617 回答