Questions
11 of 30
1What is the purpose of the transform property in CSS?
2What are the different types of CSS transformations?
3What does transform: translate() do?
4What is the difference between translateX() and translateY()?
5How does rotate() work in CSS?
6What is the unit used in rotation?
7What is the difference between scale() and scaleX(), scaleY()?
8What happens when you use negative values in scale()?
9What does the skew() function do?
10Can you combine multiple transform functions together? How? What is the use of the transform-origin property?
11What is the default transform-origin value?
12How does changing transform-origin affect rotation or scaling?
13What is the difference between translate() and using position or margin for movement?
14What is the difference between 2D and 3D transformations?
15What is the difference between 2D and 3D transformations?
16How do you apply a 3D rotation using CSS?
17How do you apply a 3D rotation using CSS?
18What are perspective and perspective-origin in 3D transforms? What is the purpose of transform-style: preserve-3d?
19What is the use of matrix() in CSS transforms?
20What’s the difference between matrix() and matrix3d()?
21How can you center an element using transform and translate()?
22What is the transition property in CSS used for?
23What are the four main components of a transition?
24What does transition-duration specify?
25What are the common timing function values (e.g., ease, linear, ease-in)?
26What is the shorthand syntax for transition?
27Can multiple CSS properties be transitioned simultaneously? How does transition differ from animation in CSS?
28Can you apply a transition to an element’s pseudo-class (like :hover)?
29Can transitions be triggered by JavaScript?
30What happens if transition-duration is set to 0s?
11 / 30

What is the default transform-origin value?

Default Value and Behavior of transform-origin in CSS

In CSS, the default value of the transform-origin property is center (50% 50%). This means that any transformation—such as rotation, scaling, or skewing—occurs around the geometric center of the element by default.

Example: Default transform-origin in Action

In this example, the .box rotates 45 degrees around its center point because the transform-origin is not explicitly set. This default behavior ensures consistent and balanced transformations.

Equivalent Default Settings
  1. 1

    transform-origin: center;

  2. 2

    transform-origin: 50% 50%;

  3. 3

    transform-origin: center center;

All three notations above represent the same default positioning — the center of the element’s box. You can modify this origin point to any other reference using keywords, percentages, or length values.

Example: Comparing Different Origins

In the example above, .box1 rotates around its center (default), .box2 rotates from the top-left corner, and .box3 rotates around the bottom-right corner.

Best Practices
  1. 1

    Use the default center origin for balanced transformations like rotation or scaling.

  2. 2

    Change the origin point for creative effects, such as door swings or pointer movements.

  3. 3

    Always test animations after changing the transform-origin, as it can greatly affect visual motion.