This example (not my code):
http://codepen.io/mohitmanuja/pen/odxic
Show how to use the radial gradient to apply the effect of smooth edges.

HTML:
body {
padding: 100px;
background: #aaa;
}
.stamp {
width: 184px;
height: 184px;
padding: 8px;
background: white;
background: radial-gradient(transparent 0px, transparent 4px, white 4px, white);
background-size: 20px 20px;
background-position: 10px 10px;
-webkit-filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.5));
}
<div class="stamp">
<img src="http://qualityLessons.net/Assets/images/css3html5.png" alt="css 3" width="184px" height="184px" />
</div>
Run codeHide resultbut when using this method with images of arbitrary size (user-created images). the edges are displayed in the wrong place. and the whole effect looks ugly.

my question is: how to achieve the same effect using a radial gradient that works with any image size?
source
share