blur() CSS Function
Description
The blur() CSS function is part of the filter property and is used to apply a Gaussian blur to an element, effectively softening its edges and reducing detail. This creates a visually “out-of-focus” effect, similar to what you would see in photography when a lens is not focused on a subject. The intensity of the blur is controlled by a length value, typically in pixels, with larger values producing a stronger blur.
When blur() is applied, it affects the rendered content of an element, including images, text, and backgrounds. However, it does not alter the element’s layout or underlying HTML structure, so it can be safely used for decorative effects without impacting the flow of content. You can combine blur() with other filter functions such as brightness() or contrast() to achieve more complex visual effects.
For example, applying a subtle blur to a img element can create a soft background effect:
img.background {
filter: blur(5px);
}
Additionally, blur() can be animated using transition to create smooth focus or hover effects. For instance, you could blur an image when hovering over a container to draw attention to overlay text:
.container img {
transition: filter 0.3s ease;
}
.container:hover img {
filter: blur(8px);
}
The blur() function is widely supported across modern browsers and is particularly useful for background effects, image overlays, and enhancing focus on specific page elements without needing additional image editing.
Syntax
blur() = blur( <length>? )
Values
- lengthIt defines the value of the standard deviation to the Gaussian function, i.e., how many pixels on the screen blend into each other; thus, a larger value will create more blur. A value of 0 leaves the image unchanged.
Example
Browser Support
The following information will show you the current browser support for the CSS blur() function. Hover over a browser icon to see the version that first introduced support for this CSS function.
This function is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
