The methods that I know about are well described in http://demosthenes.info/blog/534/Crossbrowser-Image-Blur :
1. If you have an image that has the same color on all outer edges as in the above example, you can set the background color of the body or element of the container to the same color. (FYI doesn't really apply to you, at least not in your violin).
2. Use the clip property to crop the edges of the image. the clip is always indicated in the following order:
clip: rect( top, offset of right clip from left side, offset of bottom from top, left)
In the above example, the image has a width of 367 pixels Γ 459 pixels and a blur of 2 pixels, so the clip will be listed as:
clip: rect(2px,365px,457px,2px);
(Note that the clip applies only to elements that have a position: absolute, applied to them. If you want support in IE8 and earlier, remember to leave px at the end of the values). (I donβt know if you put photos on the stack, a grid or just callouts, etc. It may be advisable if you can learn absolute positioning.)
3. Wrap the image in the containing element (a, for example), which is slightly smaller than the image, applying overflow: hidden to the outer element and moving the image to the left and slightly up to prevent visible blurring at those edges.
-
Also, throwing a border around the image seems to help, at least in Webkit, but I haven't tested it extensively.
.item img{ transition:all .5s ; border:1px solid #000; }
user164226
source share