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

Gavin Broekema
seal-mask
.a{fill-rule:evenodd;}techdegree
Gavin Broekema
Full Stack JavaScript Techdegree Student 22,443 Points

Transform-origin

I'm extremely confused as to why Gil uses transform-origin: center left; on the .back class, transform-origin: top right; on the .left class, and no transform-origin on the .right class at all... My understanding is that the transform-origin (default center/center) is the point that the images are to rotate around when given a rotate value. So why wouldn't the value stay consistent for .back and .left with transform-origin: center left & center right; respectively??

Steven Parker
Steven Parker
229,744 Points

I wonder if Guil Hernandez might answer this one himself (now that I've linked him).

Gavin Broekema
seal-mask
.a{fill-rule:evenodd;}techdegree
Gavin Broekema
Full Stack JavaScript Techdegree Student 22,443 Points

Guil sorry. I also noticed that .back and . left are both rotating along the Y-axis. This made me wonder if changing:

.left {
transform-origin: top right;
}

/* TO */

.left {
transform-origin: center right;
}

would make a difference (seeing that both top and center are values of the Y-axis). After testing both values I didn't notice any significant changes, but I may be wrong.