Home > Web Front-end > CSS Tutorial > Use CSS filters to create blurry images or text

Use CSS filters to create blurry images or text

PHPz
Release: 2023-08-26 22:01:02
forward
1436 people have browsed it

使用 CSS 滤镜创建模糊的图片或文本

Motion Blur is used to create blurred pictures or text with direction and intensity.

The following parameters can be used in this filter

S.No

Parameters and description

1

Add

True or False . If true, the image is added to the blurred image; if false, the image is not added to the blurred image.

2

Direction

Blurred direction, clockwise Direction, rounded to 45 degree increments. The default value is 270 (left).

0 = Top

45 = Top right

90 = Right

135 = Bottom right

180 = Bottom

225 = Lower left

270 = Left

315 = Upper left

3

Strength

The number of pixels the blur will expand. Default is 5 pixels.

Example

You can try running the following code to blur the image

Live Demo

<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>
Copy after login

The above is the detailed content of Use CSS filters to create blurry images or text. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template