JSFiddle - React, Tailwind, and code Playground
by agus makmun
HTML
<div class="slideshow">
<li>
<img src="http://farm6.static.flickr.com/5224/5658667829_2bb7d42a9c_m.jpg"/>
</li>
<li>
<img src="http://farm6.static.flickr.com/5230/5638093881_a791e4f819_m.jpg"/>
</li>
<li>
Pretty cool eh? This slide is proof the content can be anything.
</li>
</div>
CSS
.slideshow {
margin: 50px auto;
position: relative;
width: 240px;
height: 240px;
padding: 10px;
box-shadow: 0 0 20px rgba(0,0,0,0.4);
}
.slideshow > li {
position: absolute;
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
list-style:none;
}
JavaScript
$(".slideshow > li:gt(0)").hide();
setInterval(function() {
$('.slideshow > li:first')
.fadeOut(1000)
.next()
.fadeIn(1000)
.end()
.appendTo('.slideshow');
}, 3000);