JSFiddle - React, Tailwind, and code Playground

by dfsq

HTML

<div class="img-wrap">
    <img src="http://upload.wikimedia.org/wikipedia/commons/a/af/Bonsai_IMG_6426.jpg" class="img1" />
</div>

CSS

img {
    width:200px;
}

.img-wrap {
    display: inline-block;
    font-size: 0;
    position: relative;
}
.img-wrap:after {
    border: 0;
}
.img-wrap:hover:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    border: solid 10px #f80;
}