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

89
Visualizações
My CSS animations don't work on iOS devices

I have a CSS and JS. Its simply when I slide down to page my logo coming from left with opacity 0. Then when I came back to top again its going back and opacity being 0. Its working on computer and android phones. But on iOS devices its doesn't work. What is wrong with on my code?

Logo is coming after I slide to top it moves to the left but does not disappear. Thank you for responses .

JS:

const handleToggle = (e) => {
    let brands = document.getElementsByClassName("stickyBrand"); //Its my logo.
    if (e) {
      Array.from(brands).forEach((el) => {
        el.classList.add("fadeInLeft");
        el.classList.remove("fadeOutLeft");
      });
    } else {
      Array.from(brands).forEach((el) => {
        el.classList.add("fadeOutLeft");
        el.classList.remove("fadeInLeft");
      });
    }
  };

CSS:

@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@-webkit-keyframes fadeOutAnimationOperaSafari {
  0% {
    opacity: 0 !important;
    -webkit-transform: translateX(0);
  }
  100% {
    opacity: 1 !important;
    -webkit-transform: translateX(-50px);
  }
}

@keyframes fadeOutAnimation {
  0% {
    opacity: 0;
    -webkit-transform: translateX(0);
    -moz-transform: translateX(0);
    -o-transform: translateX(0);
    transform: translateX(0);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateX(-50px);
    -moz-transform: translateX(-50px);
    -o-transform: translateX(-50px);
    transform: translateX(-50px);
  }
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You need to add -webkit- prefixes to your transforms. On iOS, all browsers use safari webkit (because they are based on uiwebview), and currently iOS webkit only supports transforms with a prefix.
What you are seeing is that the transform is always 0 throughout the animation because the non-prefixed selector is not used.

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