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

120
Vistas
intersection observer not working when element is half outside viewport

I am using fullpage js for single scroll effect on the page and using intersection observer to detect if the element is inside the viewport to add the animation class. The fadein animation from left and right is used and works on some elements. To do that I have classes as below:

.animate-x {
    opacity: 0;
    transform: translateX(-50%);
    transition: all .5s ease-out;
}

.fl {
    opacity: 1;
    transform: translateX(0);
}

using translateX(-50%) make some elements to set position outside the viewport which does not detected by the Intersection Observer. I suppose this should not have happen since I have used this kind of propertied for animation before.

link to repo: https://github.com/Trushar10/theinstock.git

link to site: https://theinstock.netlify.app/

In section 2 left first element with class description has animate-x class which should have fl class added when the it comes in viewport. on the right side the element with class ````benefitshas classfr``` added to fadein from right animation.

Check out the links if helps.

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