How can you properly blur an image using CSS3 without fading the edges or cropping the image?
The issue the green BG show thru:
HTML:
<div id="bg_img" classid="blink_me"></div>
CSS:
/*regular way of doing it*/
body{
background-color: #0F0;
margin: 0;
padding: 0;
}
#bg_img{
filter: blur(50px); /*Set amount of blur, px units are bad when re-scaling the window size */
-webkit-filter: blur(50px); /*Set amount of blur, px units are bad when re-scaling the window size */
position:absolute;
width: 100%;
height: 100%;
background-image: url(http://www.patan77.com/wallpaper/3d_cube_explosion_patan77.jpg); /*background image*/
background-repeat:no-repeat;
background-size: cover;
background-position: center center;
}
This is the solution I came up with, its a bit of a "hack" and bit messy, but it works. (at least for me on chrome )
The way I did it was to first create a 3x3 grid and "mirror tile them"with the scale also and offset everything slightly and then I zoomed in to 300% but here is the strange part to actually get it to work I needed to make sure it rendered the tiles outside of the div so I need to have a hidden animated div (#loading_dot in the code) at the correct z-index, forcing it to render all.
//tip: use vh or vw instead of px for the blur scale.
DEMO
The image mirror tiled
HTML:
CSS:
Solution 2
A bit more viable option, have layer two images one image behind that's also blurred but scaled up slightly and have those in a wrapper element with overflow:hidden;
DEMO
HTML:
CSS: