I’m creating a new web design in Photoshop at the moment, but I’d like to know if it’s possible to blur the content beneath a div?
I’d like to create a half transparent nav
bar on my page that’s fixed at the top of your screen. Everything that flows beneath/behind, I want to have blurred. For those of you that have an iDevice with iOS 7, check out Safari’s header; where the page beneath the header is blurred. That’s the effect what I’m looking for.
I wouldn’t mind the effect not working on older browsers (IE8 etc.), which in that case will have a 0.5 opacity white background as fallback.
If this is possible, I’m really looking for the necessary code!
2
Answers
you can do this with css3, this blurs the whole element
Fiddle: http://jsfiddle.net/H4DU4/
If you want to enable unblur, you cannot just add the blur CSS to the body, you need to blur each visible child one level directly under the body and then remove the CSS to unblur. The reason is because of the “Cascade” in CSS, you cannot undo the cascading of the CSS blur effect for a child of the body. Also, to blur the body’s background image you need to use the pseudo element :before
Full Working Example Link