Rotating cube
Pure CSSSix faces placed with rotate + translateZ, spun by a single keyframe animation.
Every one has a live demo, a step-by-step explanation and code you can edit and paste into your own project.
Six faces placed with rotate + translateZ, spun by a single keyframe animation.
Triangles cut with clip-path, leaned inward by exactly the angle that makes the tips meet.
CSS has no curves in 3D, so a cylinder is 24 flat strips. Sass computes the strip width.
Two faces plus a stack of thin discs between them to fake a solid edge.
Nine circles rotated around the Y axis make the meridians; one laid flat is the equator.
Three rings tilted into different planes, each spinning inside its own plane.
Isometric plates lifting apart along the Z axis, each driven by one custom property.
Hover to blow the faces apart. One custom property moves all six.
Interactive with no JavaScript: checked radios steer the cube through sibling selectors.
Drag to spin it, release to let it coast. JS only tracks two angles and some inertia.
JS picks a random face and adds full turns; a CSS transition does the tumbling.
JS places the dots on a Fibonacci sphere once; the spin itself is a plain CSS animation.
Scroll inside the box. JS turns scroll progress into one number; CSS maps it to rotation.