今天拿到一张 294*72 的3x图片,用width或者height缩小,但是发现略有模糊。
加入下面的代码就解决拉
.logo {
width: 98px;
height: 24px;
/* 加入下面css */
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor;
}