How can you make images resized with css look good

2019-03-27 06:48发布

问题:

IE6 and IE7 don't scale images nicely in web pages when the images are scaled with css width/height or attribute width/height. I am not sure which algorithm it uses by default, but it's not good.

Scaled images display aliasing artifacts when scaled in these browsers.

回答1:

Fortunately there's a way to force IE7 to use the bicubic scaling algorithm (which looks very nice) with a simple css rule:

img { -ms-interpolation-mode: bicubic; }

The results are great, and it can be done site-wide with this single rule.

For IE6 you're out of luck as far as I know.