通过 CSS 缩放图像:-moz-crisp-edges 是否有 webkit 替代方案? [英] Image scaling by CSS: is there a webkit alternative for -moz-crisp-edges?

查看:22
本文介绍了通过 CSS 缩放图像:-moz-crisp-edges 是否有 webkit 替代方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张 100x100 像素的图像.我想显示两倍的大小,所以 200x200,我想通过 CSS 和(明确地)不通过服务器来实现.

I have an image that is 100x100 in pixels. I want to show it twice the size, so 200x200 and I want to do it by CSS and (explicitly) not by the server.

几年以来,所有浏览器都对图像进行了抗锯齿处理,而不是按像素缩放.

Since a few years, images get anti-aliased by all browsers instead of doing a by-pixel scale.

Mozilla 允许指定算法:图像渲染:-moz-crisp-edges;IE 也是如此:-ms-interpolation-mode:nearest-neighbor;

Mozilla allows to specify the algorithm: image-rendering: -moz-crisp-edges; So does IE: -ms-interpolation-mode: nearest-neighbor;

任何已知的 webkit 替代方案?

Any known webkit alternative?

推荐答案

不幸的是,WebKit 中似乎没有此功能.查看最近的错误报告:

Unfortunately, it looks like this feature is absent in WebKit. See this recent bug report:

https://bugs.webkit.org/show_bug.cgi?id=40881

这篇关于通过 CSS 缩放图像:-moz-crisp-edges 是否有 webkit 替代方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆