在Internet Explorer上,PNG太尖锐了

时间:2015-12-02 10:45:41

标签: html css html5 css3 web

任何人都可以帮我解决这个问题吗? Google Chrome上的徽标图片显示效果很好,但在Internet Explorer上它看起来太尖锐了,我需要一个解决方案:C

错误图片: Png too sharp on IE

另一张图片: Png too sharp on IE 2

这是我显示图像的方式(在div中):

#topmenu-logo {
   background: url("/images/xCarga/logotipo.png") no-repeat center;
   background-color:#ececec;
   background-size: contain;
   width: 437px;
   height: 84px;
}

2 个答案:

答案 0 :(得分:2)

这是IE图像渲染引擎的问题,is notoriously bad

您可以尝试这种IE插值模式:

img { -ms-interpolation-mode: nearest-neighbor; }  

编辑:从您的评论到原始问题,您的主页标题上显示的是您的徽标的全尺寸版本(3508x516像素!)。您应该使用图形程序来调整徽标的大小,并在主页上使用较小的版本(抗锯齿)。让浏览器调整如此大的图像会导致性能问题。 (注意:链接已删除。)

答案 1 :(得分:0)

您可以尝试使用

rtmp://192.168.0.100:1935/dvr