|
Internet Explorer 7 and -ms-interpolation-mode css |
Whilst working on a recent project I was looking at how IE 7 renders images that have been incorrectly sized in code. There is a css style "-ms-interpolation-mode" that handles stretched images in IE 7.
The msInterpolationMode property works with stretched images only. As an example if the dimensions of an image are 200x200 but the developer has specified height and width of 400x400, then the image will be stretched to the new dimensions using the nearest-neighbor algorithm, unless you override it with this property.
Notice the difference in the overstretched images above?
This can be achieved by adding this code to your style sheets:
2img.high { -ms-interpolation-mode:bicubic }
3img.nearest { -ms-interpolation-mode:nearest-neighbor }
4</style>
Note that Firefox handles this automatically.
There are no comments for this entry.
[Add Comment] [Subscribe to Comments]