transform origin code example

Example 1: css transform origin

/* Syntax */
transform-origin: y-axis x-axis z-axis|initial|inherit;

/* Example */
transform-origin: center right;

/* Possible Values

 x-axis - left, center, right, (length), (%)
 y-axis - top, center, bottom, (length), (%)
 z-axis - (length)

*/

Example 2: transform orgin css

div {
  transform: rotate(45deg);
  transform-origin: 20% 40%;
}

Example 3: transform-origin

transform-origin: -100% 50%;
transform: rotate(45deg);

Example 4: transform origin

Awesome Demo of transform-origin: 
https://www.w3schools.com/cssref/trycss3_transform-origin_inuse.htm

Tags:

Css Example