I used marquee element before for my flash news but since it was deprecated based on this https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee I tried to use CSS instead. but there is a problem I encounter only the 1st span element is being shown not the rest of my span element.
.flashnews_today {
margin: 0 auto;
white-space: nowrap;
overflow: hidden;
/*box-sizing: border-box;*/
/*border: 1px green solid;*/
}
.flashnews_today span {
display: inline-block;
padding-left: 100%;
text-indent: 0;
/*border: 1px red solid;*/
-webkit-animation: flashnews_today 45s linear infinite;
animation: flashnews_today 45s linear infinite;
}
.flashnews_today span:hover {
animation-play-state: paused
}
/* Make it move */
@keyframes flashnews_today {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(-100%, 0);
}
}
<div class="flashnews_today">
<span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><span>Hello, I am a StackOverflow user. </span>
<span>Hello, I am a StackOverflow user.</span>
<span>Hello, I am a StackOverflow user. </span>
<span>Hello, I am a StackOverflow user. </span>
<span>Hello, I am a StackOverflow user. </span>
</div>