Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

If I want to rotate the item 30deg clockwise and then 30deg counter-clockwise, how can I do that? Do I set 2 transforms?

If I want to rotate the item 30deg clockwise and then 30deg counter-clockwise, how can I do that? Do I set 2 transforms rotation? How do I set the delay for the second rotation?

1 Answer

Steven Parker
Steven Parker
229,608 Points

You can set different delays on multiple transition properties, but since "transform" is just one transition property (though it may have multiple transform functions), I don't think you can do this with a transition.

But you can do it using CSS animation, or by combining CSS with a bit of JavaScript.