CSS 3D & Perspective
Flip Tiles Grid
A 4x4 grid of tiles on a tilted plane flip in a diagonal sine wave, alternating between powder-blue and tan gradient faces.
csslight complexitymoderate motion
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Hero backgrounds, loading screens, or decorative grid displays where rhythmic 3D motion sets a premium aesthetic.
When not to
Contexts where users may have vestibular sensitivities — though a reduced-motion fallback exists, the static state may look odd. Avoid behind dense text overlays.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change grid size to 5x5 by setting N=5, swap face A's gradient to a deeper slate (#A9B8BC → #7c8a90), and slow the wave by changing t+=0.02 to t+=0.01. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.
Safe to edit
- grid size (N=4)
- wave speed (t += 0.02)
- diagonal phase offset (o.d * 0.35)
- face A gradient colors (#B0D4DD, #D8B297)
- face B gradient colors (#D8B297, #B0D4DD)
- tile size (10vmin) and gap (1.4vmin)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- transform-style: preserve-3d on .tile
- backface-visibility: hidden on .face
- visibilitychange pause/resume
- prefers-reduced-motion guard
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- No click or hover interactivity — purely decorative
- Grid tilt angle (rotateX 16deg) is hardcoded in CSS, not a JS variable
- Tile count scales as N², so large N values hit perf quickly
More CSS 3D & Perspective components
- Rotating CubeGlowing sage-green wireframe cube slowly auto-rotates in CSS 3D with a subtle sine-wave tilt; pointer movement offsets the rotation to follow the cursor.
- Card Deck FanSeven gold-and-mauve playing cards fan open and closed in a sine-wave 3D arc using CSS rotateZ and perspective transform.
- Coverflow RingEight vivid gradient cards orbit in a 3D coverflow ring with CSS perspective and per-card reflections. Pointer X position steers rotation speed.
- Folding Paper4-panel paper accordion folds and unfolds in a zig-zag CSS 3D motion, slowly rotating on a dark green background. Cream front and sage back faces alternate.
- Isometric Blocks3x3 grid of soft lilac CSS 3D cubes bobs in a staggered sine wave on a dark lilac-tinted ground. Three shaded faces per cube simulate isometric lighting.
- Parallax DepthA glowing sun with colored orbiting dots on layered CSS 3D planes that tilt and parallax toward the pointer; auto-orbits until interaction.