2014-01-14 8 views
6

私はウェブサイトにpng画像をアップロードしました。それらはファイアフォックス、クロム、サファリで完璧に見えますが、それらは恐ろしいです。私はPhotoshopからファイルを保存しました。イメージサイズは、バイキュービック、バイキュービックシャープ、バイキュービックスムーザー、バイキュービック、バイリニア、および最寄りのネイバーのようなイメージを持つオプションがあります。これらのどれが助けになるだろうか?イメージはピクセル化されています

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   */ 
} 
+2

恐ろしいブラウザは恐ろしいものをレンダリングします.....私たちは助けることができるようにあなたのCSSとHTMLを共有しています! :) – NoobEditor

+3

ウェブサイトで必要なサイズでサーバーにイメージを保存する必要があります。ヘッダーが800x100pxとして表示される場合、画像は正確に800x100pxでなければなりません。 – Njol

+0

私はcssとhtmlをアップロードしました – totneschap

答えて

4

古いIEの方法がある:これは悪い文書化されて

-ms-interpolation-mode: bicubic; 

+0

ありがとう@バーニー – totneschap

+30

これは私のために働かなかった –

+0

この問題は、jQueryプラグインで解決することができます:http://stackoverflow.com/questions/34965904/ie-thumbnail-pixelation-when高解像度画像は小サイズに設定されます – Spirit

関連する問題