Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
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?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!