JSFiddle - React, Tailwind, and code Playground
HTML
<div id="loading"></div>
<div id="container">
<img src="http://www.playirishlottery.co.uk/wp-content/uploads/image-2.jpg"/>
</div>
CSS
@keyframes loading-animation {
0% {background: url(slika1); }
25% { background: url(slika2); }
50% { background: url(slika3); }
75% { background: url(slika4); }
100% { background: url(slika5); }
}
#loading {
background: url('http://cdn.nirmaltv.com/images/generatorphp-thumb.gif'); /*za stare brskalnike*/
animation:loading-animation infinite;
height: 64px;
width: 64px;
}
#container {
display: none;
}
JavaScript
$(window).load(function() {
//show();
});
function show() {
$('#loading').hide();
$('#container').fadeIn();
};
setTimeout(show, 3000);