Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

filter: blur(1px); doesn't work in Firefox, Internet Explorer, and Opera

I have a problem with CSS. When I try to do

-webkit-filter: blur(1px); -moz-filter: blur(1px); -ms-filter: blur(1px); -o-filter: blur(1px); filter: blur(1px); 

it looks perfect in Safari and Chrome, but the blur doesn't show up at all in Firefox, Opera, or Internet Explorer. Do those browsers support it? Or is there another method of getting the entire page to blur?

like image 833
Thomas Lai Avatar asked Apr 04 '13 05:04

Thomas Lai


People also ask

How do I blur the background of a picture in Firefox?

(2) There is also a Firefox-specific implementation that can work with any background graphic (e.g., the image drawn with Canvas API): using -moz-element() to copy the background and blur it with filter: blur() .

Can I use CSS filter blur?

CSS Filter EffectsFilter functions include blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, sepia and saturate.

How do you blur in CSS?

Syntax. filter: blur(px); To apply a blur effect to the background image, with the blur function use the z-index property to set the stack order of the element, set the width and height 100% to have a full background image.


2 Answers

Try with SVG filter.

img {    filter: blur(3px);    -webkit-filter: blur(3px);    -moz-filter: blur(3px);    -o-filter: blur(3px);    -ms-filter: blur(3px);    filter: url(#blur);    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius='3');  }
<img src="https://i.stack.imgur.com/oURrw.png" />    <svg version="1.1" xmlns="http://www.w3.org/2000/svg">     <filter id="blur">         <feGaussianBlur stdDeviation="3" />     </filter>  </svg>
like image 190
Arpad Bajzath Avatar answered Sep 19 '22 17:09

Arpad Bajzath


filter: blur(3px); -webkit-filter: blur(3px); -ms-filter: blur(3px); filter: url("data:image/svg+xml;utf9,<svg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'><filter%20id='blur'><feGaussianBlur%20stdDeviation='3'%20/></filter></svg>#blur"); filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='3');  
like image 26
rostber Avatar answered Sep 19 '22 17:09

rostber