JSFiddle - React, Tailwind, and code Playground

by donqi

HTML

<div id="shaidan">
		<ul>
			<li id="one">1</li>
			<li id="two">2</li>
			<li id="three">3</li>
			<li id="four">4</li>
			<li id="five">5</li>
		</ul>
	</div>

CSS

*{
		padding: 0;
		margin: 0;
	}

	#shaidan{
		width: 500px;
		height: 160px;
		margin: 50px auto;
		overflow: hidden;
	}
	#shaidan ul li{
		height: 80px;
		list-style: none;
		font-size: 40px;
		line-height: 80px;
		text-align: center;
		color: white;
		
	}
	#one{background: blue}
	#two{background: black}
	#three{background: orange}
	#four{background: green}
	#five{background: red}

JavaScript

$(function(){
			setInterval(function(){
				$('#shaidan ul li').last().height(0);
				$('#shaidan ul').prepend($('#shaidan ul li').last());
				$('#shaidan ul li').first().animate({'height':'80px'},500);	
			},1000)
			
		})