I am blurring some images with this code
img {
filter: blur(5px);
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
}
The edges of the image get blurred too though. Is it possible to blur the image, while keeping the edges defined? Like an inset blur or something?
You could put it in a
<div>withoverflow: hidden;and set the<img>tomargin: -5px -10px -10px -5px;.Demo:
Output
CSS
HTML