Skip to content

Instantly share code, notes, and snippets.

@alvinwan
Created February 21, 2019 18:18
Show Gist options
  • Save alvinwan/a14bf81c9a7208c6a4ef412b0871479b to your computer and use it in GitHub Desktop.
Save alvinwan/a14bf81c9a7208c6a4ef412b0871479b to your computer and use it in GitHub Desktop.
The noob's guide to 3D Transforms with CSS - Cube Example, Style 2
.cube {
width:100%;
height:100%;
position:relative;
animation: spinning 2s infinite;
transform-style:preserve-3d;
}
@keyframes spinning {
from { transform: translateZ(-5em) rotateY(0deg); }
to { transform: translateZ(-5em) rotateY(360deg); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment