JSFiddle - React, Tailwind, and code Playground
HTML
<div class="initials">Z</div>
CSS
.initials {
position:absolute;
background: {
color:main color
}
;
color:white;
margin-top:20px;
padding-top:20px;
padding-bottom:20px;
width:60px;
text-align:center;
margin-left:20px;
font-size:20px;
letter-spacing:5px;
box-shadow:0px 2px 3px rgba(0, 0, 0, .15);
overflow: hidden;
white-space: nowrap;
}
JavaScript
$(function () {
var src = "http://static.tumblr.com/lxn1yld/Hnxnxaqya/space.gif";
var $e = $(".initials").css({ opacity : 0 });
var img = new Image();
img.onload = function () {
$e.css({
'background-image': "url(" + src + ")",
}).animate({ opacity : 1.0}, 3000);
};
img.src = src;
});