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 trialNick Huemmer
Front End Web Development Techdegree Graduate 26,840 PointsDoes anyone have the code to make the animation behave as it does in the video for versions of current browsers?
My animation looks different in Chrome, Firefox and Edge than it does in the video. I'm almost certain this is because the browsers have evolved since this video was made.
Does anyone have the code to make the animation in current versions of browsers behave the same way it does in the videos?
3 Answers
Bert Witzel
Full Stack JavaScript Techdegree Graduate 27,918 PointsHi Nick! I had the same problem, so I added a transform-box to .badge:
.badge * {
transform-origin: 50% 50%;
transform-box: fill-box;
}
David Holt
8,441 PointsBert that was super helpful!
James Albert
Front End Web Development Techdegree Graduate 14,089 PointsThanks @Bert Witzel! That fixed the transform-origin issues.
Nick Huemmer
Front End Web Development Techdegree Graduate 26,840 PointsNick Huemmer
Front End Web Development Techdegree Graduate 26,840 PointsExcellent Bert!
Majd Mora
15,302 PointsMajd Mora
15,302 PointsTry this one..
.badge * { transform-origin: 180px 180px; }
Maj Gajšek
Front End Web Development Techdegree Student 10,200 PointsMaj Gajšek
Front End Web Development Techdegree Student 10,200 PointsThank you Bert 🧨