JSFiddle - React, Tailwind, and code Playground

HTML

<div class="marquee">
  <p>
    <span class='marq-text'>This text is a looooooooong marquee.</span>;
    <span class='marq-text'>And This one is another :-)</span>;
    <span class='marq-text'>Third marquee is ignored completely :-(</span>;
  </p>
</div>

CSS

.marquee p {
    /* Starting position */
    -moz-transform:translateX(100%);
    -webkit-transform:translateX(100%);    
    transform:translateX(100%);
    /* Apply animation to this element */  
    -moz-animation: scroll-right 5s linear infinite;
    -webkit-animation: scroll-right 5s linear infinite;
    animation: scroll-right 5s linear infinite;

    white-space: nowrap;
}
.marq-text{
    margin-left:100px;
}
/* Move it (define the animation) */
@-moz-keyframes scroll-right {
    0%   { -moz-transform: translateX(-100%); }
    100% { -moz-transform: translateX(0%); }
}
@-webkit-keyframes scroll-right {
    0%   { -webkit-transform: translateX(-100%); }
    100% { -webkit-transform: translateX(100%); }
}
@keyframes scroll-right {
    0%   
    { 
        -moz-transform: translateX(-100%); /* Browser bug fix */
        -webkit-transform: translateX(-100%); /* Browser bug fix */
        transform: translateX(-100%);       
    }
    100% 
    { 
        -moz-transform: translateX(100%); /* Browser bug fix */
        -webkit-transform: translateX(100%); /* Browser bug fix */
        transform: translateX(100%); 
    }
}

.marquee{
  width:400px;
  border:red solid 1px;
  margin:0 auto;
  /* overflow:hidden; */
}