此滤镜中可以使用以下参数
s.no
参数及说明
1
添加对或错。如果为 true,则将图像添加到模糊图像中;如果为 false,则图像不会添加到模糊图像中。
2
方向模糊的方向,顺时针方向,四舍五入到 45 度增量。默认值为 270(左)。
0 = 顶部
45 = 右上
90 = 右
135 = 底部右
180 = 底部
225 = 左下
270 = 左
315 = 左上
3
强度模糊将扩展的像素数。默认为 5 像素。
示例您可以尝试运行以下代码进行模糊处理图像
现场演示
<html> <head> </head> <body> <img src = "/css/images/logo.png" alt="css logo" style = "filter: blur(add = 0, direction = 225, strength = 10)"> <p>text example:</p> <div style="width: 357; height: 50; font-size: 30pt; font-family: arial black; color: blue; filter: blur(add = 1, direction = 225, strength = 10)">css tutorials</div> </body></html>
以上就是使用 css 滤镜创建模糊的图片或文本的详细内容。