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

104
Vistas
Automatically scrolling repeating list of components Vue3

I am trying to figure out how to make a container that is overflowing with components start scrolling through them and infinitely repeating (When moving outside of the container, reappearing at the top).

Example of the component:

<template>
  <div class="grid grid-cols-2 mt-5 text-3xl">        
    <div class="flex">
      <img class="h-20 w-20 rounded-full object-cover object-top" :src="absentee.employee.image" alt="../../assets/silhuett.png">
      <span class="ml-4 font-bold mt-auto mb-auto">{{absentee.employee.name}}</span> 
    </div>
    <span class="ml-2 m-auto mb-auto text-4xl">{{absentee.reason}}</span>
  </div>
</template>

Components are added like this:

<div  class="grid-item row-start-3 row-span-1 overflow-y-hidden">
  <font-awesome-icon
    class="text-blue-800 text-5xl"
    :icon="['fas', 'house-user']"
  />
  <span class="ml-5 text-5xl">Frånvaro</span>
  <div class="autoscrolling"> 
    <div v-for="absentee in store.dashboard.aftersales.absentees" :key="absentee._id">
      <OneAbsentee :absentee="absentee" />
    </div>
  </div>
</div>  

I tried to use css animations but I cant get them to reappear at the top while moving out of view, they just scroll out of view then, Pop!, the reappear at the top again and restarts.

.autoscrolling {
    position: relative;
    top: 270px;
    /* Starting position */
    -moz-transform:translateY(-80%);
    -webkit-transform:translateY(-80%); 
    transform:translateY(-80%);
    /* Apply animation to this element */   
    -moz-animation: autoscrolling 15s linear infinite;
    -webkit-animation: autoscrolling 15s linear infinite;
    animation: autoscrolling 15s linear infinite;
    }
    /* Move it (define the animation) */
    @-moz-keyframes autoscrolling {
    0%   { -moz-transform: translateY(-80%); }
    100% { -moz-transform: translateY(80%); }
    }
    @-webkit-keyframes autoscrolling {
    0%   { -webkit-transform: translateY(-80%); }
    100% { -webkit-transform: translateY(80%); }
    }
    @keyframes autoscrolling {
    0%   { 
    -moz-transform: translateY(-80%); /* Firefox bug fix */
    -webkit-transform: translateY(-80%); /* Firefox bug fix */
    transform: translateY(-80%);        
    }
    100% { 
    -moz-transform: translateY(80%); /* Firefox bug fix */
    -webkit-transform: translateY(80%); /* Firefox bug fix */
    transform: translateY(80%); 
    }
}

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