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
Why lazy loading sections creates overflow_x

Hello I have a problem I am trying to make my page RWD but the problem is it creates overflow_x when sections are loaded by interSectionObserver, and it causes that positioning on page dies but when it reaches end of the page, everything is fixed. More code can be found on my github but I am not sure do I have permission to paste it.

CSS

.section {
   transition: opacity 1s, transform 1s;
}
.hidden-section {
    opacity: 0;
    transform: translateY(7rem);
}

JS:

        
        _revealSection() {
                const sections = document.querySelectorAll('.section');
                const options = {
                    root: null,
                    threshold: 0.15,
                    rootMargin: "0px",
                }
        
                const showSection = ((entries, observer) => {
                    const [entry] = entries;
                    if (!entry.isIntersecting) return 
                    entry.target.classList.toggle('hidden-section')
                    observer.unobserve(entry.target)
                    
                })
        
                const sectionFadeIn = new IntersectionObserver(showSection, options);
        
                sections.forEach(sec => {
                    sec.classList.add('hidden-section')
                    sectionFadeIn.observe(sec)
                } )
            }

HTML:

    <section class="section" id="section--5">
                <div class="contact">
                    <h1 class="contact__header">Are you ready for an new experience?</h1>
                    <button class=" modal-button contact__button" data-but="4">contact us</button>
                </div>

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

0

Okay the problem was in html and body tag.

html, body {
width: 100;
overflow-x: hidden;
 }
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