Instead, think of scaling with a start (0,0) as scaling + translation with a center of origin. Separately:
-webkit-transform-origin: top left; -webkit-transform: scale(1.5);
matches with:
-webkit-transform-origin: center; -webkit-transform: scale(1.5) translate3d(16.66%, 16.66%, 0);
Theoretically, the center of the start of rotation should leave angles sticking out at sqrt(1/2)-0.5 , requiring us to move the beginning down and to the right by 20.71% , but for some reason the webkit transform algorithm carries things for us (but not really enough) and scales the origin for us (again, not quite). Thus, we need to move 50% to the right and make some adjustments for this odd behavior:
-webkit-transform-origin: center; -webkit-transform: scale(1.5) rotate(45deg) translate3d(52.5%, 0.5%, 0); -webkit-transition: all 2s ease-in;
Note. My original answer used a div with width:100px; and height100px; which requires translate3d(54px, 0, 0) .
source share