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

196
Visualizações
I am using some scroll animations but it is causing horizontal scroll out of the screen

I have set up some scroll animations on many elements of a site I'm building.

I'm using these CSS rules:

.hiddenLeft {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(-090%);
    transition: all 1s;
}

.hiddenRight {
    opacity: 0;
    filter: blur(5px);
    transform: translateX(90%);
    transition: all 1s;
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
}

The hiddenLeft and hiddenRight classes are in the elements by default, and then when they are intersected during vertical scroll the show classes are added.

It all works fine, except it has created horizontal scroll to the right out of the width of the site into blank space.

I would like to keep the animations as they are but without the horizontal scroll.

A picture of me scrolling out to the side into the blank space for reference:

enter image description here

I made a very basic replication here:

https://codepen.io/acodeaday/pen/NWMYWNL

I can see that the offending line is

transform: translateX(90%);

But that makes the animation very aesthetically pleasing. So I'm hoping there is a way to solve it while keeping that.

almost 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Try using

max-width: 100%!important; height: auto; overflow: hidden!important;

this code whatever you put all of your animation inside. That can be a div. Hope this help~

almost 4 years ago · Santiago Trujillo 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