gskalinskii
gskalinskii

Reputation: 965

How to change origin of a 3d transform?

I'm applying rotateX transform to an elment and would like to move the origin of that transform to the top of an element. Using transform-origin property doesn't seem to work..

transform-origin: 50% 0% 50%;

check the fiddle please. http://jsfiddle.net/y977K/

Upvotes: 0

Views: 107

Answers (1)

Zach Saucier
Zach Saucier

Reputation: 26014

Use transform-origin:top, which is equivalent to transform-origin:0% 50%; and transform-origin:top center. Updated fiddle

For a full chart of the possible values a transform-origin as well as what each keyword equivalency is, check out mozilla's developer page on it

Upvotes: 1

Related Questions