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

161
Visualizações
Loading spinner page on switching pages, in react app

I have this code in my index.html file stackblitz example

 <html style="height: 100%;" lang="en" class="perfect-scrollbar-off nav-open">

<head>
  <style type="text/css">
    .loaderDiv {
      background: #117CF7;
      width: 100%;
      height: 100%;
      display: flex;
    }

    .loader {
      border: 16px solid #f3f3f3;
      border-radius: 50%;
      border-top: 16px solid #3498db;
      width: 200px;
      height: 200px;
      -webkit-animation: spin 2s linear infinite;
      /* Safari */
      animation: spin 2s linear infinite;
      margin: auto;
    }

    #supersmartLogo {
      width: 150px;
      height: 150px;
      position: absolute;
      left: 45%;
      top: 38%;
    }


    .wrapper {
      background: url('./random.svg') center no-repeat;
      background-size:50%;
      margin: auto;
      width: 240px;
      height: 240px;
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }
  </style>
</head>

       <body style="height: 100%;" class="g-sidenav-show g-sidenav-pinned">
      <div id="root" style="height: 100%;">
        <div class="loaderDiv">
          <div class="wrapper">
            <div class="loader"></div>
          </div>
        </div>
      </div>
    </body>
</html>

it's working fine but I have some problems:

  1. the random.svg shows only for the first reload and when I move between pages the random.svg does not show.

  2. how can I add a shadow under the spinner like this.

can anyone tell me how to fix it please or a better way to achieve this behavior?

about 4 years ago · Juan Pablo Isaza
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