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

272
Vistas
How can I make text visible when found with browser search?

I have in a web-page repeated divs which are normally transparent, but are made opaque when the mouse hovers over their parent:

<div class="entry">
  ...
  <div class="info">
    some information text
  </div>
</div>
div.info {
    opacity: 0;
}
.entry:hover div.info {
    opacity: 1;
}

I would now like to make that page searchable through the standard browser "find in page" functionality. That actually works, but if the found text is within such a div.info, it is obviously invisible, too.

Is there a way I can make my div visible not just on hover, but also if it contains found text? Or specify the style of found text, including that is is supposed to be visible?

I looked at the other CSS pseudo-classes, but none of them match my purpose. I also experimented with the pseudo-element ::target-text as an alternative to found text.

Do I have to do this via JavaScript?

over 4 years ago · Santiago Trujillo
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