Home >Web Front-end >CSS Tutorial >Can css3 fonts be blurred?

Can css3 fonts be blurred?

藏色散人
藏色散人Original
2021-01-28 09:47:542940browse

css3 fonts can be blurred; developers can use the filter attribute in CSS3 to achieve the font blur effect. The filter syntax is "filter: blur(px);", and its filter attribute defines the visibility of the element. Effect.

Can css3 fonts be blurred?

The operating environment of this tutorial: Windows 7 system, CSS3 version, DELL G3 computer.

Recommended: css video tutorial

We can use the CSS3 filter attribute to achieve the font blur effect; syntax: filter: blur(px);

The filter attribute defines the visual effect (such as blur and saturation) of the element (usually Can css3 fonts be blurred?).

The attribute value blur(px) can set Gaussian blur to the image. The "radius" value sets the standard deviation of the Gaussian function, or how many pixels are blended together on the screen, so the larger the value, the blurr it is; if there is no set value, the default is 0; this parameter can set the css length value, but Percentage values ​​are not accepted.

Example:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <style>
            .blur {
-webkit-filter: blur(1px); /* Chrome, Opera */
-moz-filter: blur(1px);
-ms-filter: blur(1px);
filter: blur(1px);
}
        </style>
    </head>
    <body>
    <p>正常字体</p>
        <p class="blur">模糊的字体</p>
    </body>
</html>

Rendering:

Can css3 fonts be blurred?

The above is the detailed content of Can css3 fonts be blurred?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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