ie中的图像是像素化的

时间:2014-01-14 10:19:34

标签: css image internet-explorer image-processing photoshop

我已将png图像上传到网站,它们在firefox,chrome和safari中看起来很完美,但它们看起来很糟糕。我已经保存了来自photoshop的文件,并且它们具有图像大小下的功能,使您可以选择将图像设置为:bicubic automatic,bicubic sharper,bicubic smooth,bisubic,bilinear和nearest neighbor。这些都有帮助吗?

HTML:

<ul class="social">
  <li><a target="_blank" href="https://plus.google.com/+ToadhallcottagesCoUk/posts"><img onmouseout=this.src='/images/googleplusgrey-flat.png' onmouseover=this.src='/images/googleplus-flat.png' src="/images/googleplusgrey-flat.png" width="38" height="38" alt="Toad Hall Cottages Google Plus Page"</a></li>
  <li><a target="_blank" href="http://www.twitter.com/thcottages"><img onmouseout=this.src='/images/twittergrey-flat.png' onmouseover=this.src='/images/twitter-flat.png' src="/images/twittergrey-flat.png" width="38" height="38" alt="Toad Hall Cottages on Twitter" /></a></li>
  <li><a target="_blank" href="http://www.facebook.com/holidaycottages"><img <img onmouseout=this.src='/images/facebookgrey-flat.png' onmouseover=this.src='/images/facebook-flat.png'  src="/images/facebookgrey-flat.png" width="38" height="38" alt="Toad Hall Cottages Facebook page"/></a></li>
  <li><a target="_blank" href="http://www.pinterest.com/thcottages/"><img <img onmouseout=this.src='/images/pinterestgrey-flat.png' onmouseover=this.src='/images/pinterest-flat.png' src="/images/pinterestgrey-flat.png" width="38" height="38" alt="Toad Hall Cottages Facebook page" /></a></li>
</ul>

的CSS:

img.icon { 
  vertical-align: middle; 
  margin-right: 8px; 
  margin-left: 2px;
  image-rendering:optimizeSpeed;             /* Legal fallback */
  image-rendering:-moz-crisp-edges;          /* Firefox        */
  image-rendering:-o-crisp-edges;            /* Opera          */
  image-rendering:-webkit-optimize-contrast; /* Safari         */
}

1 个答案:

答案 0 :(得分:6)

旧的IE方法是:

-ms-interpolation-mode: bicubic;

这个记录很少。