Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
The default transform origin of an HTML element is its center, so the transform functions we apply move elements according to this center point. We can modify the spot at which the element is scaled or rotated using the 'transform-origin' property.
Resources
Video review
- The default transform origin of an HTML element is its center, or
50% 50%
. -
transform-origin
is a separate CSS property; you add it to the element you're transforming. -
transform-origin
accepts values as length units, percentages, or position keywords. - In
transform-origin
, the first value sets the horizontal origin, and the second value sets the vertical origin. - The value
0 0
moves the origin to the element's top-left corner. - The value
100% 100%
positions the origin at the furthest point on the X axis and the furthest point on the Y axisββorbottom right
.
Related videos
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated 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