<div class="img-wrap">
<img src="https://via.placeholder.com/150" alt="">
</div>
.img-wrap {
position: relative;
margin: 50px;
display: inline-block;
font-size: 0;
}
.img-wrap::before {
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
border: 2px solid #000;
transform: translate(-10px, -10px);
}
img {
position: relative;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.