This example (not my code):
http://codepen.io/mohitmanuja/pen/odxic
Show how to use radial-gradient to apply a nice stamp edges effect.
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>
but when using this method with arbitrary sized pictures (user generated pictures). the edges shows in the wrong place. and the whole effect looks ugly.
my question is: how to achieve the same effect using radial-gradient that works with any image size?