JSFiddle - React, Tailwind, and code Playground
by Victor
HTML
<div class="stage">
<div class="bar"></div>
</div>
CSS
.stage {
width:100%;
height:100%;
position:absolute;
top:0;
left:0;
background: url('http://www.hhhhold.com/800');
}
.bar {
width:100%;
height:10%;
background: #fff;
}
JavaScript
$('.stage').append('<div class="bar"></div>');
$('.bar').clone().appendTo('.stage');
$('.bar').clone().appendTo('.stage');
$('.stage').append('<div class="bar"></div>');
$('.stage').append('<div class="bar"></div>');
//alert($('.bar').length);
$('.bar').each(function(i){
$(this).delay(i * 300).animate({width:"0", opacity:"0"}, 500);
})