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

143
Visualizações
how to create an effect just before displaying a web page

hi i tested this piece of code found on stackoverflow here

without success...

I manage to use 'Swup' for the transitions but not for the arrival on the page

* {
      -webkit-transition: all .5s;
      -webkit-animation-name: myfading;
      -webkit-animation-duration: .8s;
}

@-webkit-keyframes myfading {
      from {
            opacity: 0;
            -webkit-transition: opacity;
      }
      to {
            opacity: 1;
      }
}
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Hi you shouldn't add an Animation style to every html element with the * selector. Why don't you think about to place a fullscreen Container on top of every element and fade this Container out with a timed animation? Something like this:

.loadContainer {
    -webkit-animation-name: myfading;
    -webkit-animation-duration:.5s;
    animation-delay: 3s;
    animation-fill-mode: forwards;
    width:100%;
    height:100%;
    position:fixed;
    left:0;
    top:0;
    background:#dadada;
    display:flex;
    justify-content:center;
    align-items:center;
}

@-webkit-keyframes myfading {
    from {
          opacity: 1;
    }
    to {
          opacity: 0;
    }
}
    <div class="loadContainer">
      <span style="font-weight:bold;color:white;">LOADING WEBSITE ...</span>
    </div>
    <div class="page-wrapper">
        <h1>My Website</h1>
        <section style="min-height:100vh">
            <p>
                Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati nesciunt dolor, vero assumenda recusandae accusantium provident et praesentium delectus sit odit suscipit modi sunt hic!
            </p>
        </section>
    </div>

about 4 years ago · Juan Pablo Isaza Relatório

0

@ChrisSchober answer is already very good. But it can lead to problems under certain circumstances. Imagine you have one or more large CSS files. They have to be loaded first. Meaning you will only start the effect when the styles are loaded. One way to avoid this would be to hide the body first until everything is loaded. Then you can fade in the body with Javascript and thus start the animation.

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