Summary
Blurs an element, for use by the filter property. Accepts a distance measurement within which pixels are randomly scattered. A value of 0 leaves the image as is.
This CSS property value is reflected in the following image:
filter: blur(10px);
Note that pixels blur around the contours of image transparencies, possibly affecting the ability of background content to show through:
Compatibility
There is no data available for topic “css”, feature “blur”. If you think that there should be data available, consider opening an issue.
Examples
View live exampleThe following example shows the difference between two images, where one has a blur of 10px:
HTML
<!DOCTYPE html>
<html>
<head>
<title>Blur example</title>
<style>
.foo {
float: left;
}
.bar {
-webkit-filter: blur(10px);
}
</style>
</head>
<body>
<img src="http://www.webplatform.org/logo/wplogo_transparent_xlg.png" class="foo" />
<img src="http://www.webplatform.org/logo/wplogo_transparent_xlg.png" class="foo bar" />
</body>
</html>
近期评论