blur()

Baseline Widely available

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

blur() CSS 方法将高斯模糊应用于输出图片。结果为 <filter-function>.

尝试一下

语法

blur(radius)

radius

模糊的半径,值为<length>。它定义了高斯函数的标准偏差值,即屏幕上有多少像素相互融合; 因此,较大的值会产生更多模糊。值为 0 会使输入保持不变。该值为空则为 0。

示例

css
blur(0)        /* No effect */
blur(8px)      /* Blur with 8px radius */
blur(1.17rem)  /* Blur with 1.17rem radius */

参见