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

447
Vistas
How can I change the background color of the element?
          //border3
          var revealThree = document.querySelectorAll('.BorderThree');

          for(var i = 0; i < revealThree.length; i++){

            var windowheight = window.innerHeight;
            var revealtop = revealThree[i].getBoundingClientRect().top;
            var revealpoint = 50;

            if(revealtop < windowheight - revealpoint){
              revealThree[i].classList.add('active');
            }
            else{
              revealThree[i].classList.remove('active');
            }
          }

 

I tried creating a border but when I added a js function, the border's background color suddenly became grey when it should only be a border.

Here's the code for CSS:

    .BorderThree{
      width: 300px;
      height: 450px;
      position: absolute;
      top: 900px;
      border-style: solid;
      border-color: azure;
      left: 900px;
      transform: translateY(150px);
      opacity: 0;
      transition: all 2s ease;

    }

.BorderThree.active{
  transform: translateY(0px);
  opacity: 1;
color: #000;
}

and when I tried adjusting the the opacity, the whole border is affected. I'd appreciate your help, thank you.

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