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 CSS Transitions and Transforms Adding 3D Effects with CSS Changing the Viewing Position with perspective-origin

keywords and percentages

are the keywords ordered backwards of the percentage order? for example when i put in bottom left and then want to change it to %. does the first percentage value effect left and right and not top and bottom?

1 Answer

Hi Jake!

For two percentages, it is always x value first then y value. However, when using keywords (top, right, bottom, left) the order doesn't matter. Per MDN:

/* One-value syntax */ perspective-origin: x-position;

/* Two-value syntax */ perspective-origin: x-position y-position;

/* When both x-position and y-position are keywords, the following is also valid */

perspective-origin: y-position x-position;

Here's the link so you can read more about it if you'd like! MDN perspective-origin

Happy coding!