Using CSS,
like the following: http://gyazo.com/ff14a415cf7ac8622eb0cada3e23137f
I want to us CSS (preferably not CSS3) to get the edges and corners to have that effect, instead of just sharp egdes.
Blurring the background elements of a div can be achieved using backdrop-filter . All the elements placed under the div are going be blurred by using this.
If what you're looking for is simply to blur the image edges you can simply use the box-shadow with an inset. With CSS it's possible to create a circle. Just use "border-radius:50%". The above method for creating an image soft edge does not appear to work with 'circle' images.
You can achieve this effect by using a box-shadow
the same color as the div's background, like this:
.blur-box {
background-color: #555;
box-shadow: 0 0 5px 10px #555;
}
You can adjust the second and third arguments (5px
and 10px
here) to tweak the relative size and blur radius (respectively) of the shadow in order to get it the way you want, and this feature is well supported by modern browsers (see: http://caniuse.com/#feat=css-boxshadow).
Here's a jsFiddle demo: http://jsfiddle.net/bXAFt/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With