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

239
Visualizações
My animated div glitches upwards than back down during animation

I have made a basic div with a header and a paragraph inside of it and when I perform a multistep animation, the box glitches upwards than moves back down. It makes it look very glitchy and strange. You can view my error at https://jsfiddle.net/yajuy8qy/. Code:

<div class="enlarge">
    <h1 class="title">Welcome!</h1>
    <p>Zach</p>
    </div>
<script>
$(document).ready(function() {
$(".enlarge").animate({minHeight: '500px'}, "slow");
$(".enlarge").animate({width: '80%'}, "slow");
}); 
</script>
<style>
.enlarge {
height: 500px;
width: 50%;
background-color: #2098D1;
align-items: center;
align-content: center;
border-radius: 15px;
position: relative;
margin: 10px auto;
}
</style>

Thanks!

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

0

There seems to be an issue with the default padding property. Try setting the padding on the div (even 1px appears fixes the glitch).

.enlarge{
    padding: 1px;
}
over 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