How to control the speed
The speed is determined by the animation property in the .marquee-text class. The duration is set in seconds (280s). Adjust this value to speed up or slow down the animation. For instance:Example:
.marquee-text { animation: float 280s linear infinite; /* CONTROL THE SPEED */ }Example: To make the text move faster, reduce the duration:
.marquee-text { animation: float 140s linear infinite; /* CONTROL THE SPEED */ }How to change direction left-right
The direction is controlled by the @keyframes float section in the CSS. There are two main setups:- For LEFT TO RIGHT movement
@keyframes float {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-550%); /* CHANGE FLOAT DIRECTION */
}
}
- For RIGHT TO LEFTmovement
@keyframes float {
0% {
transform: translateX(-550%);
}
100% {
transform: translateX(0); /* CHANGE FLOAT DIRECTION */
}
}
That's all you need to change! Just swap these values (-550%) (0) to change direction. Everything else in the code can stay the same.