Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

139
Visualizações
Does Gsap changes fixed position property static on its own?

Am using gsap animation library in my react project, there is particular div which I animate when mouse enter event is fired on its parent element, I have set position of that element to fixed, before I add the gsap animation the div is not moving along with the rest of the Contents but after applying the animation that div is no longer fixed is moving along with rest of the content, please how can I make that element not to move or scroll with rest of the page? I also tried make the position of it to fixed with the gsap but my styles collapse, how can I solve the issue?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If I understand you correctly, that's totally unrelated to GSAP - that's just how CSS/browsers work. If you have position: fixed on an element that's inside a container element that has a transform applied (or one of several other properties), it creates a new stacking context and the position: fixed element is no longer fixed to the viewport.

You can remove GSAP entirely and just apply an inline transform (which is what GSAP does anyway) and you'll see that the same thing happens. That's according to the spec. So if you want that element to be fixed in the viewport, you'll need to either restructure your HTML so that it's not inside a container with a transform applied, or you'd have to counter-animate it the opposite direction of scroll to make it appear to remain fixed.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda