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

286
Vistas
Css animation doesn't move object

I have a problem with a css animation im trying to add to each child inside a nav tag

I'm trying to create a moving stock panel The weird thing about it is that if I add another css attribute like color it does work

Does anyone knows how to solve this

function DoAnimation(animation, a) {
  var parent = a.parentElement
  if (animation != null) {
    parent.removeChild(a);
    parent.appendChild(a);
    console.log(1);
    a.style.animationName = animation;
    a.style.animationDuration = "2s";
  }
}
@keyframes MoveStockTORIght {
  from {
    left: 0;
  }
  to {
    transform: translateX(100px);
  }
}

.SiteNav {
  overflow: hidden;
  text-align: center;
  margin: auto;
  text-align: center;
}

.SiteNav a {
  gap: 10%;
  padding: 1%;
}
<nav class="SiteNav" id="siteNavigantion">


  <a href="StockPage.aspx?stock=MSFT" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a0">MSFT   294.23</a>
  <a href="StockPage.aspx?stock=CLOV" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a1">CLOV   8.06</a>
  <a href="StockPage.aspx?stock=LCID" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a2">LCID   22.87</a>
  <a href="StockPage.aspx?stock=SAVA" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a3">SAVA   51.08</a>
  <a href="StockPage.aspx?stock=AAL" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a4">AAL   20.13</a>
  <a href="StockPage.aspx?stock=AMZN" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a5">AMZN   3246.3</a>
  <a href="StockPage.aspx?stock=NFLX" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a6">NFLX   627.04</a>
  <a href="StockPage.aspx?stock=GOOG" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a7">GOOG   2776.95</a>
  <a href="StockPage.aspx?stock=AAPL" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a8">AAPL   142.81</a>
  <a href="StockPage.aspx?stock=NVDA" style="color: green; animation-name: MoveStockTORIght; animation-duration: 2s;" id="a9">NVDA   206.95</a>
</nav>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Why not just use Marquee?

.SiteNav {
  overflow: hidden;
  text-align: center;
  margin: auto;
  text-align: center;
}

.SiteNav a {
  gap: 10%;
  padding: 1%;
}

marquee a { text-decoration: none; color:green; }
<marquee class="SiteNav" id="siteNavigantion">


  <a href="StockPage.aspx?stock=MSFT" id="a0">MSFT   294.23</a>
  <a href="StockPage.aspx?stock=CLOV" id="a1">CLOV   8.06</a>
  <a href="StockPage.aspx?stock=LCID" id="a2">LCID   22.87</a>
  <a href="StockPage.aspx?stock=SAVA" id="a3">SAVA   51.08</a>
  <a href="StockPage.aspx?stock=AAL"  id="a4">AAL   20.13</a>
  <a href="StockPage.aspx?stock=AMZN" id="a5">AMZN   3246.3</a>
  <a href="StockPage.aspx?stock=NFLX" id="a6">NFLX   627.04</a>
  <a href="StockPage.aspx?stock=GOOG" id="a7">GOOG   2776.95</a>
  <a href="StockPage.aspx?stock=AAPL" id="a8">AAPL   142.81</a>
  <a href="StockPage.aspx?stock=NVDA" id="a9">NVDA   206.95</a>
</marquee>

about 4 years ago · Juan Pablo Isaza Denunciar
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