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

155
Views
Rotate previous element on next hovered

Is there a way to rotate letter A on letter B hovered using HTML, CSS and JS? ~ seems to doesn't work, because "B" is next to "A"

HTML

<h2 class='h2' id='A' style="display:inline-block;">A</h2>
<h2 class='h2' id='B' style="display:inline-block;">B</h2>

CSS

.h2
{
    font-size: 50px;
    font-family: times new roman;
    font-style: regular;
    color: black;
}
#A:active
{
    transform: scale(1.5);
}
#B:hover ~ #A
{
    transform: rotate(90deg);
}

Code example: https://jsfiddle.net/f4p6rzgs/1

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