• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

111
Vistas
How can I active several hover event in some separated sibling components simultaneously by hovering on each of them?

I have three separated React component (a button, an image and a paragraph for example) which each of them has its hover event styled in its separated scss file. All of the components are sibling. I want each of these hover events works by hover on any of other elements. Is it possible by scss or I should do it by React JS? How should I do that?

almost 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could achieve that with :hover css pseudo-class on the parent element, and specify the ruleset with appropriate child selector. For example:

div:hover img {
  /* some styling */
}

div:hover p {
  /* some styling */
}

div:hover button {
  /* some styling */
}
<div>
  <img />
  <p>some paragraph</p>
  <button>Press me!</button>
</div>

You can read more about :hover here, and about css selectors here

almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda