JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container with-svg">SVG</div>
<div class="container with-gif">GIF</div>
<p>
<a href="http://1mg.fr/images/spinner.svg">Download SVG →</a>
</p>
CSS
.container {
display: inline-block; border: 1px solid #CCC; color: #999;
width: 50px; height: 50px; font: 7pt sans-serif;
background-repeat: no-repeat;
background-position: center;
}
.with-svg {
background-image: url(http://1mg.fr/images/spinner.svg);
}
.with-gif {
background-image: url(http://1mg.fr/images/spinner16.gif);
}