Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Gavin Broekema
seal-mask
.a{fill-rule:evenodd;}techdegree
Gavin Broekema
Full Stack JavaScript Techdegree Student 16,214 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
220,925 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 16,214 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.