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

136
Visualizações
Hover doesn't react

My hover doesn't work at all. I need my element to only show up when I hover over it, but I can't get it to work.

I don't know if it's necessary to replace the i tag with an a, or if the error is in the css. I also tried with display: none and display: block, but the problem still doesn't solve. What can it be?

My html:

                        <div class="vertical-line"></div>
                        <div>
                            <h4>{{ banner.textPrimary }}</h4>
                        </div>
                        <div>
                            <h2>{{ banner.textSecondary }}<br /></h2>
                        </div>
                        <div class="vertical-line"></div>

                        <div>
                            <a href="{{ banner.buttonLink }}" target="_blank">
                                <button
                                    [style.background-color]="banner.buttonColor"
                                    style="border: solid 1px"
                                    class="btn-about-us"
                                    mat-raised-button
                                    color="primary"
                                >
                                    {{ banner.buttonText }}
                                </button>
                            </a>
                        </div>
                    </div>
                    <i
                    (click)="openBannerDeleteModal(banner.uuid)"
                    *ngIf="isAdminFlag === 'true'"
                    class="fas fa-trash-alt delete-modal"
                    id="banner-delete"
                    aria-hidden="true"
                ></i>

And my css:

.delete-modal{
    cursor: pointer;
    position: absolute;
    bottom: 80%;
    left: 91%;
    z-index: 1000;
    visibility: hidden;
}

.delete-modal:hover{
   visibility: visible;
}
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

For visibility: hidden; hover does not work and it is a normal behavior.
I think in your case opacity would be better.

.delete-modal {
  ...
  opacity: 0;
}

.delete-modal:hover {
  ...
  opacity: 1;
}
about 4 years ago · Juan Pablo Isaza Relatório

0

you cant hover over something is not visible on your page, in that way your hover event is not fired at all,

instead place the hover on the parent, then do visibilty:visible on the desired element.

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