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

244
Visualizações
Trigger button from hover

I want to display the __button when I hover over the __image. But right now, the button has its own hover. It should do this: when the hover from __image is triggered, raise opacity of __button to visible.

Thanks for any help!

&__image {
    display:grid
    &:hover {
        transition: 1s;
        transform: scale(1.05);
    }
}

&__button {
    opacity: 0;
    display: grid;
    &:hover {
        opacity: 1;
    }
}
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Ah I found one solution.

&__image {
    display:grid
    &:hover {
        transition: 1s;
        transform: scale(1.05);
       .button {
               opacity: 1;
            }
    }
}

&__button {
    opacity: 0;
    display: grid;
}

And then in js: className="item__music button item__button"

about 4 years ago · Juan Pablo Isaza Relatório

0

If this is the layout of your HTML

<div class="item">
  <div class="__image" style="height:200px;width: 200px;background-color:red;margin:20px"></div>
  <div class="__button" style="height:200px;width: 200px;background-color:red;margin:20px"></div>
</div>

Then this style should do it:

.item {
  .__image {
    display: grid;
    &:hover {
      cursor: pointer;
      transition: 1s;
      transform: scale(1.05);
      + .__button {
        opacity: 1;
      }
    }
  }

  .__button {
    opacity: 0;
    display: grid;
    &:hover {
      opacity: 1;
    }
  }
}
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