While this method may not be the most efficient, it is possible to achieve the desired effect with code similar to this:
Here's the HTML structure:
<div class="thumbnail-parent">
<img class="thumbnail" src="http://placehold.it/200x200" />
<div class="badge"></div>
</div>
The corresponding CSS styling would look like this:
.thumbnail-parent, .thumbnail {
width: 200px;
height: 200px;
position: relative;
display: inline-block;
}
.badge {
width: 20px;
height: 20px;
background-color: Black;
position: absolute;
top: 0px;
right: 0px;
visibility: hidden;
}
.thumbnail-parent:hover .badge {
visibility: visible;
}