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

178
Views
How to chain transforms with TailwindCSS?

I want to chain multiple transforms to achieve an animation effect.

The transforms are in 3 parts:

  1. Initial state is x=0, rotate -45deg
  2. x= -2px, rotate 0deg, duration 300ms, delay 0
  3. x=0, rotate +45deg, duration 300ms, delay 300ms (so that it starts after 2)

I tried to just list the translations in order, but it is not working:

const openingAnimation = "rotate-0 translate-x-0.5 delay-300 duration-300 rotate-45 translate-x-0"
const initialRotation = "-rotate-45"'

<div className={`absolute h-px w-3 bg-white text-white last:ml-2 
                transform ease-in-out duration-300 
                ${toggled ? openingAnimation : initialRotation}`}
/>

Do I have to do it with Javascript and a timeout function that will add the third animation?

about 4 years ago · Juan Pablo Isaza
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!