I did this example.
I'm trying to blur the background image, but the main content is blurred too (the <span>
)
How can I blur the background without blurring the content?
I did this example.
I'm trying to blur the background image, but the main content is blurred too (the <span>
)
How can I blur the background without blurring the content?
jsfiddle
You can blur the body background image by using the body's :before pseudo class to inherit the image and then blurring it. Wrap all that into a class and use javascript to add and remove the class to blur and unblur.
Add another
div
orimg
to your maindiv
and blur that instead. jsfiddleYou could overlay one element above the blurred element like so
DEMO
jsfiddle.
What about this? No absolute positioning on div, but instead on img and span.