When a div is viewed in perspective and has the transformations rotateY(-90deg) rotateX(-180deg)
, adding rotateZ(-90deg)
to it results in a rotation of +270 degrees instead of -90 degrees.
The new style of the div changes from
transform: rotateY(-90deg) rotateX(-180deg);
to
transform: rotateZ(-90deg) rotateY(-90deg) rotateX(-180deg);
I find it interesting that when you chain three rotations like this
rotate(90deg) rotate(90deg) rotate(90deg)
, the result is not a rotation of +270 degrees but rather -90 degrees. Why is that?
You can check out the jsFiddle demo here: http://jsfiddle.net/Sdg2W/1/
Do you think this behavior is a bug? I would appreciate any insight on this matter.