Web design styles - depth and material
3D web design
3D web design gives a page real depth. At the simple end that means tilted cards, buttons that look extruded and press down, and layered shadows. At the far end it means full 3D scenes, products you can spin and worlds you can scroll through, rendered with WebGL libraries such as Three.js. This guide covers the CSS end, which works everywhere, and when it’s worth going further.
A live example
This sample page is built with this page’s own CSS, using 3D transforms and stacked shadows rather than WebGL. Hover a card to flatten it. Switch to the common mistake to see the tilt go too far.
Spring trips
Plan your next weekend away
Pick a city, choose your dates and we’ll put the whole trip in one place.
Stays
Hotels and flats near where you’ll be. Pick by area, price or how close you are to the station.
Find a stayDone well: a gentle tilt that flattens on hover, buttons with a solid edge that press down when clicked, and a layered shadow on the headline only.
What makes it 3D web design
Perspective
Elements tilt in space, as if seen from slightly above or to the side.
perspective: 1200pxSolid edges
Buttons and cards have a thick, solid shadow that looks like their side.
box-shadow: 0 8px 0 #0f172aPress and lift
Buttons press down, and cards lift or flatten when you interact.
transform: translateY(4px)Layered type
Stacked text shadows make headings look extruded.
text-shadow: 1px 1px 0, 2px 2px 0 ...The CSS
Every effect here is CSS, so it works in any browser and costs almost nothing. Real 3D scenes need WebGL, which is a much bigger commitment.
/* Give children a 3D space to tilt in */
.cards { perspective: 1200px; }
.card-3d {
border-radius: 20px;
background: linear-gradient(160deg, #334155, #1e293b);
box-shadow:
0 8px 0 #0f172a, /* the card's solid edge */
0 18px 30px rgba(0, 0, 0, 0.45); /* the shadow it casts */
transform: rotateX(8deg) rotateY(-6deg);
transition: transform 0.3s;
}
.card-3d:hover,
.card-3d:focus-within { transform: none; }
/* An extruded button that presses down */
.button-3d {
background: #4f46e5;
color: #ffffff;
border-radius: 12px;
box-shadow: 0 5px 0 #312e81;
transition: transform 80ms, box-shadow 80ms;
}
.button-3d:active {
transform: translateY(4px);
box-shadow: 0 1px 0 #312e81;
}
/* Extruded headline */
.headline-3d {
text-shadow: 1px 1px 0 #6366f1, 2px 2px 0 #5b5fe0, 3px 3px 0 #4f52c8, 4px 4px 0 #4346b0;
}
@media (prefers-reduced-motion: reduce) {
.card-3d, .button-3d { transition: none; }
}Tuning the values
| Property | A good starting range | What goes wrong outside it |
|---|---|---|
| Tilt | rotateX and rotateY up to about 10deg | Bigger tilts skew text so it’s hard to read. |
perspective | 800px to 1500px | Smaller values give an extreme, fish-eye distortion. |
| Button edge | 3px to 6px | Deeper edges make buttons look like toys and push them out of line. |
| Headline layers | 3 to 5 | More layers turn into a smear, especially on small screens. |
When it works
- Product launches, games and tech brands.
- Hero sections and feature highlights.
- Interactive product viewers, where people want to see an object from every side.
When to avoid it
- Content-heavy pages, where tilted text gets tiring.
- Sites that need to run well on older phones, if you’re using WebGL.
- Brands that need to feel calm and simple.
How far to go
Three levels of 3D on the web
"3D" covers everything from a shadow to a full game engine. Each step up looks more impressive and costs more in build time, file size and performance.
1. Shadows and layers
Extruded buttons, stacked text shadows and offset edges. Pure CSS, works everywhere and costs nothing.
2. CSS 3D transforms
perspective,rotateXandrotateYtilt real elements in space. Text stays selectable and accessible.3. WebGL scenes
Three.js and similar libraries render real 3D models. Powerful, but heavy, and the content inside isn’t readable by screen readers.
Always have a fallback
If you use WebGL, show a still image or a simpler layout when it can’t load or someone prefers reduced motion.
What to check when you review a 3D site
3D effects look impressive in a demo and can cause real problems on everyday devices. These are the things to check.
.card-3d1. Tilted text
Check text on tilted elements is still easy to read. Big tilts skew it badly.
@media (prefers-reduced-motion)2. Reduced motion
Check tilts, spins and parallax stop or soften for people who prefer reduced motion.
canvas3. WebGL performance
Check 3D scenes on a mid-range phone. Look for stuttering, heat and battery drain.
canvas4. A fallback
Check there’s a still image or simpler layout when WebGL fails or is switched off.
.button-3d:active5. Pressed states
Check extruded buttons actually press down, so they feel real.
canvas6. Keyboard and screen readers
Check anything inside a 3D scene that matters, such as links or product details, is also available outside it.
.glb, .gltf7. Model file sizes
Check 3D models are compressed. Uncompressed models can be several megabytes.
:focus-visible8. Focus outlines
Check focus is visible on tilted and layered elements.
Reviewing with clients
Notes on exactly which effect is too much
A 3D effect that’s smooth on your machine can stutter on a client’s older phone. Every note records the device, so you can see where it struggled. With ClickNote, clients click directly on elements of the website and leave a note, without creating an account or installing a browser extension.
Send your client a review link for the page.
They click the element that’s hard to read or slow, and say what they see.
You get the selector, a screenshot and their device, so you can go straight to the right rule in your CSS.
This card looks a bit squashed and the text is hard to read at this angle.
mobile · Chrome on Android - 360 x 800
.d-card.c2 > .d-textReviewing a site in one of these styles?
Send your client a review link and they can click directly on elements of the website and leave a note, without creating an account or installing a browser extension. You get the selector, a screenshot and their device with every note.
14-day free trial. No card needed. See pricing.