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

243
Views
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 answers
Answer question

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 Report

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 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!