Skip to content

Instantly share code, notes, and snippets.

@alvinwan
Last active February 21, 2019 18:06
Show Gist options
  • Save alvinwan/cdcfa678d24a441620a645245e2a28cd to your computer and use it in GitHub Desktop.
Save alvinwan/cdcfa678d24a441620a645245e2a28cd to your computer and use it in GitHub Desktop.
The noob's guide to 3D Transforms with CSS - Rotations
.rotated-square {
transform:
rotateX(20deg) /* flip "up" */
rotateY(-20deg) /* flip "right" */
rotateZ(20deg); /* rotate counter-clockwise */
}
.rotated-square-shorthand {
transform: rotate3d(20deg, -20deg, 20deg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment