Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating a blurred background effect

I am trying to create a blur effect on a page. I want a popup to show, and then the rest of the page be blurred. However I only seem to be able to blur background images, not actual elements on the page, is what I am trying to do even possible?

like image 973
user2909486 Avatar asked Nov 01 '13 13:11

user2909486


People also ask

How do you make background blurry?

Place your image in your composition, then duplicate it. Select the top photo and use the Remove Background tool to cut out the subject. Click on the bottom photo and use the Blur effect to blur the background.

How do you make a blurred picture effect?

While there are many ways to create a motion blur effect, the best way to start is by slowing down your shutter speed. When the shutter is open longer, the subject has more time to move across the frame and establish some kind of blur. Think of it this way.

How do I make the background blurry for free?

FaceTune2 can help you blur the backgrounds of your photos. Along with one-touch background replacement tools, you can try artistic styles and filters on your photos. You get to choose the subject and blur just the background and set the intensity of the blurring effect for a professional-style picture in seconds.


1 Answers

You can blur individual elements, but you can't create a blurring overlay.

Fortunately, the CSS -prefix-filter: blur(##) automatically applies to child elements. What you'd need to is wrap every element except your popup in a div, then apply the blur to that.

Example JS:

$('body > *').wrap('<div class="blur-all">').append($popup);

CSS:

.blur-all {
    -webkit-filter: blur(10px);
    -moz-filter: blur(10px);
    -o-filter: blur(10px);
    -ms-filter: blur(10px);
    filter: blur(10px);
}

Don't forget to unwrap the children of .blur-all once you're done with the popup.

like image 54
Blazemonger Avatar answered Sep 28 '22 18:09

Blazemonger