Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to blur a divs background?

Featured Replies

#divname {
background-blur: 0.6;
}

 

you can use any number from 0.0 to 1.0

  • Author

It's not working... I looked on css3.info and there is no background-blur selector...

you could just blur it in photoshop, or maybe layer a cloudy, transparent white png over the background, or you can try this way: css tricks blurry background effect

 

or try using background-ripple instead

You guys have GOT to stop taking me so seriously...

 

I find it VERY difficult to take you seriously BF, must be something to do with the name... :rofl:

  • Author
You guys have GOT to stop taking me so seriously...

 

ROTFLOLMAO sooooo funny. (Not).

 

Do you know how to do it or not?

  • Author
semi transparent png dude!

 

I'm not that stupid, I knew that already, how do I blur it though?

  • Author

.....

 

Ok. I have a body background of a carbon fiber texture.. I then have an image over the top of that of light streaks, then I have a div on top of that which overlaps the light streaks and the div has a 10px by 10px 10% opacity white background.

 

I want the background (light streaks) to blur only under the div that is on top of it.

 

Please would someone tell me if this is possible??

is the what format is the light streaks? jpg png? can u give us a link to what u have so far?

  • Author

It's a PNG, I've only got a screenshot, here:

 

post-3142-1232821010_thumb.png

Is the div and background going to be fixed width? or is the div going to move around the background depending on the screen res?

you might be able to copy the bg and fade it a little, increase the opacity. that shouldnt effect the bg but it will leave a faded carbon effect on the light streaks...?

You can blur images on the fly with js. If the div's dimensions vary depending on content, that's your best bet. Or you could have two complete copy's of the bg image, one blurred, one not.

 

And show the blurred one in a div, and as the div expands it just shows more of the blurred background which lines up perfectly with the un-blurred background?

 

If you understand what i'm trying to say?

  • Author
Is the div and background going to be fixed width? or is the div going to move around the background depending on the screen res?

 

Helen, the div is going to move around.

 

 

you might be able to copy the bg and fade it a little, increase the opacity. that shouldnt effect the bg but it will leave a faded carbon effect on the light streaks...?

 

I don't think that will work.

 

 

You can blur images on the fly with js. If the div's dimensions vary depending on content, that's your best bet. Or you could have two complete copy's of the bg image, one blurred, one not.

 

And show the blurred one in a div, and as the div expands it just shows more of the blurred background which lines up perfectly with the un-blurred background?

 

If you understand what i'm trying to say?

 

What is the code for blurring the div's background? I don't know javascript.

I'll have a look around, i've only found code based on the prototype library, i'll try and find some standalone script. Or if you have a library of preference, or a library you'll be using anyway for other features like jquery or mootools?

 

I'll see what i can dig up, there's a lot of old js code that only works for ie, clogging up any search results... so i'll dig around and get back to you.

  • Author
I'll have a look around, i've only found code based on the prototype library, i'll try and find some standalone script. Or if you have a library of preference, or a library you'll be using anyway for other features like jquery or mootools?

 

I'll see what i can dig up, there's a lot of old js code that only works for ie, clogging up any search results... so i'll dig around and get back to you.

 

Thank you very much, I really appreciate it!

 

I'll use jQuery or Mootools or scriptillicious I don't care.

  • Author
I think theres a plugin for jquery, with a guassian blur effect.

 

http://keith-wood.name/svgRef.html#gaussianblur

 

I think that might be it, but i can't find a visual example, so without actually implementing it i couldn't tell you, i'll keep digging around though.

 

Thank you bocaj

  • Author

Anyone come up with anything?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.