.marquee-container {
overflow: hidden; /* Hide overflowing text */
white-space: nowrap; /* Keep text on one line */
width: 100%; /* Or set a specific width */
}
.marquee-content {
display: inline-block;
padding-left: 100%; /* Start outside the right edge */
animation: marquee 10s linear infinite; /* Adjust speed */
}
@keyframes marquee {
0% { transform: translate(0, 0); }
100% { transform: translate(-100%, 0); }
}
trigger on hover:
.marquee-container:hover .marquee-content {
animation: marquee 10s linear infinite;
}
ellipsis is one of them, standard, see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-overflow
but we should also offer an animated version that moves though the text, like a ticker symbol out the OG marquee tag:
Rough CSS, use text-overflow + CSS animations, then decide when to trigger it:
But on touch input we might want to use long press?