Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

317
Vistas
CSS left to right, reappear left animation

I have an image that I animated with CSS. It goes from -200px left to 2100px right and then starts over. What I want to do is when part of the image is disappearing to the right, I want that part to show on the left side and continue the animation.

Here is an example of what I want, you can see how part of the text that goes off-screen to the right reappears left and continues the animation. I want to do the same thing with CSS or JS.

Example Gif

Part of my code right now (I made it small - don't view full screen):

body {
background-color: pink;
width: 400px;
height: 200px;
}

.box {
  position: absolute;
  bottom: 50px;
  left: 0px;
  width: 200px;
  height: 100px;
  background-color: black;
  animation: animate 5s linear infinite;
}

@keyframes animate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(310%);
  }
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <link rel="stylesheet" href="style.css" />
</head>

<body>
  <div class="box"></div>   
</body>

</html>

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda