Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Transforming SVG elements with CSS is similar to transforming HTML elements with CSS. You can rotate, scale, skew and translate SVGs using the transform property. In this video, you'll learn how to group SVG shapes and rotate them from a center origin.
Update
If the rotation appears off-center, apply transform-box: fill-box
to your SVG, like so:
.gear-icon {
transition: transform .4s ease-out;
transform-origin: 50% 50%;
transform-box: fill-box;
}
You can learn more about transform-box on MDN.
Quick Reference
Related Videos
Browser Support
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
vamosrope14
14,932 Points1 Answer
-
Samuel Fortunato
20,229 Points10 Answers
-
Abdullahi Abdinasir Ali
9,520 Points2 Answers
-
Jennifer James
6,430 Points2 Answers
-
Catarina Fernandes
10,884 Points2 Answers
-
Andrew Dang
2,776 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up