1
As you did not put more details in the question follows a simple model that can serve you. Basically you need to create a "container" with overflow:hidden
and do the animation with @keyframes
.txt {
width: 10em;
height: 1.5em;
background-color: red;
color: #fff;
font-family: sans-serif;
font-size: 1rem;
line-height: 1.5em;
padding: 0.5em;
white-space: nowrap;
overflow: hidden;
}
.txt span {
padding-left: 100%;
display: inline-block;
animation: texto 10s linear infinite;
}
@keyframes texto {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(-100%, 0);
}
}
<div class="txt"><span>URGENTE!!! - <strong>Bolso Mito vai te pegar</strong> se vc não colocar o código na pergunta!</span></div>
Buddy if you don’t post the code you already have, you won’t get help!
– LeAndrade
Without posting the code is complicated, I could even suggest you use something unlikely like
<marquee>
in your code for example...– Ricardo Pontual
Stackoverflow does not provide ready-made code
– Sveen
@Ricardopunctual This element is obsolete. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee
– Valdeir Psr
@Valdeirpsr I know, so I said "suggest using something unlikely", I don’t think you understand what I mean :)
– Ricardo Pontual