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
Browser support is generally excellent for SVG animations with CSS. However, there is an issue in Firefox with transform-origin and percentage values. You'll commonly see this referred to as the "transform origin bug" in Firefox.
Update
If the rotation appears off-center, apply transform-box: fill-box
to your SVG, like so:
.gear-icon,
.hammer-icon,
.heart-icon {
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-
conflictingcode
11,223 Points1 Answer
-
hector alvarado
15,796 Points0 Answers
-
Lasse Pedersen
10,416 Points1 Answer
-
Abhishek Bhardwaj
3,316 Points2 Answers
-
Ary de Oliveira
28,298 Points3 Answers
-
Matt Smith
10,750 Points0 Answers
-
Tarik Hamilton
6,799 Points3 Answers
-
Manav Misra
11,778 Points1 Answer
-
mitchell hunt
4,589 PointsFrom Animating with SVG: FF rotation bug) cx,cy seem to be in viewBox coordinates instead of "px".
Posted by mitchell huntmitchell hunt
4,589 Points1 Answer
-
Travis Johnson
Full Stack JavaScript Techdegree Student 6,025 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