不知怎么的,下面这张放大的雪碧图在Internet Explorer9中并没有显示为清晰的、最接近完美的像素。在FF中,完美的像素/清晰。
然而,在IE中,它似乎变得双三次平滑,这在这种情况下我不想要。你知道这个css有什么问题吗?
.iconbig{ /* upscale the icons sprite images 200% and show them pixelperfect */
background-image:url(icons.gif);
background-repeat:no-repeat;
height:200%;
background-size: 26px auto;
-moz-background-size: 26px;
image-rendering:-moz-crisp-edges;
-ms-interpolation-mode:nearest-neighbor; /* <<== seems not working !!! */
}发布于 2011-04-11 18:57:30
我敢打赌-ms-interpolation-mode:最近邻居只适用于html IMG标签,而不适用于背景图像。因为MS属性仅适用于拉伸图像。对于一个解决方案,我只能考虑只为IE加载一个替代的css背景图像,图形缩放的文件在最近的邻居(也许你可以使用png-8,减少颜色,以节省内存。虽然png压缩已经可以压缩相同颜色的大区域)模式,但在一些2D软件中完成。
发布于 2012-10-03 14:31:43
已从IE9中删除-ms-interpolation-mode。显然,微软认为我们只在-ms-interpolation-mode:bicubic上需要它,而且由于IE9总是使用双立方缩放,他们认为这个属性已经过时,并删除了它。
https://stackoverflow.com/questions/5578142
复制相似问题