JSFiddle - React, Tailwind, and code Playground
HTML
<div class="marquee">
<p>1.How to add WordPress Related Posts Without Plugins</p>
<p>2.How to add WordPress Related Posts Without Plugins</p>
<p>3.How to add WordPress Related Posts Without Plugins</p>
<p>Automate Your Dropbox Files With Actions</p>
</div>
<div class="marquee" id="second">
<p>How to add WordPress Related Posts Without Plugins</p>
<p>Automate Your Dropbox Files With Actions</p>
</div>
CSS
.marquee {
width: 500px;
height: 50px;
margin: 25px auto;
overflow: hidden;
position: relative;
border: 1px solid #000;
background-color: #222;
/*-webkit-border-radius: 5px;*/
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, .5), 0px 1px 0px rgba(250, 250, 250, .2);
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, .5), 0px 1px 0px rgba(250, 250, 250, .2);
-webkit-transition: background-color 350ms;
-moz-transition: background-color 350ms;
transition: background-color 350ms;
}
.marquee p {
position: absolute;
font-family: Tahoma, Arial, sans-serif;
width: 100%;
height: 100%;
margin: 0;
line-height: 50px;
text-align: center;
color: #fff;
text-shadow: 1px 1px 0px #000000;
filter: dropshadow(color=#000000, offx=1, offy=1);
transform:translateX(100%);
-moz-transform:translateX(100%);
-webkit-transform:translateX(100%);
}
.marquee.up p {
transform:translateY(100%);
-moz-transform:translateY(100%);
-webkit-transform:translateY(100%);
}
.marquee.up p {
transform:translateY(100%);
-moz-transform:translateY(100%);
-webkit-transform:translateY(100%);
}
.marquee.up p:nth-child(1) {
animation: up-one 100s ease forwards;
-moz-animation: up-one 100s ease forwards;
-webkit-animation: up-one 100s ease forwards;
}
.marquee.up p:nth-child(2) {
animation: up-two 100s ease forwards;
-moz-animation: up-two 100s ease forwards;
-webkit-animation: up-two 100s ease forwards;
}
.marquee.up p:nth-child(3) {
animation: up-three 100s ease forwards;
-moz-animation: up-three 100s ease forwards;
-webkit-animation: up-three 100s ease forwards;
}
.marquee.up p:nth-child(4) {
animation: up-four 100s ease forwards;
-moz-animation: up-four 100s ease forwards;
-webkit-animation: up-four 100s ease forwards;
}
.marquee.up p:nth-child(5) {
animation: up-five 100s ease...