The following are examples of 3D transformation roations.
3-D transformation rotate on an AXIS:
X = a horizontal axis
Y = a vertical axis
Z = an axis that is toward you in space:

image of axis

The following examples of 3 dimenstional CSS rotations.

This is a horizontal rotation round the X axis.

rose illustration

This is a vertical rotation round the Y axis.

rose illustration

This is a rotation round the Z axis.

rose illustration

The z axis does the exact same thing as the rotate.
The CSS transform:rotate is on the Z axis by default.