Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

137
Vistas
I want the logo to appear animatedly when the navbar becomes sticky

https://weartuality.com/

You see the black navbar on that site. There is no logo on that black navbar, but when it becomes sticky, the logo appears. How can I do this using html css javascript?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Listen for the scroll event and show/hide the logo if a certain Y scroll position is reached.

const logoElement = document.querySelector(".logo"); // <--- update this selector
const checkLogo = () => {
   if (window.scrollY > 100) {// <-- your non-sticky nav's height here
       logoElement.style.setProperty("transform", "scale(1)");
   } else {
       logoElement.style.setProperty("transform", "scale(0)");
   }
}
checkLogo();
window.addEventListener("scroll", checkLogo);

CSS:

.my-logo {
    transform: scale(0);
    transition: transform .3s;
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda