image-rendering

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

image-rendering 属性向浏览器提供了一个在图片处理时应如何权衡速度和质量的提示。

即使原始数据和/或目标设备是索引颜色的,也总是在真彩色(例如,24 位)颜色空间中进行重新采样。

备注: 作为一个表现属性,image-rendering 可以用作 CSS 属性。请参考 CSS image-rendering,以获取更多的信息。

你可以和下面的 SVG 元素一起使用该属性:

使用说明

auto | optimizeSpeed | optimizeQuality
默认值 auto
动画性
auto

表示用户代理可以在速度和质量间做适当的权衡,但是质量将比速度更重要一些。

optimizeSpeed

表示用户代理应该更注重速度。

optimizeQuality

表示用户代理应该更注重质量。

规范

Specification
CSS Images Module Level 3
# the-image-rendering
Scalable Vector Graphics (SVG) 2
# ImageRendering

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
image-rendering

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见