Carousel 3D V2
Five large slides in a ring, turning slowly around a vertical axis, one turn every 20 seconds, pausing on hover and on focus. Pure CSS.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. 3D has 50 effects, including 8 free. Explore the category →
3 usage examples



How it works
Three levels are enough. The .crv-stage box (280 × 180 px) carries perspective: 1000px; the .crv-track keeps its children in space with transform-style: preserve-3d; five 120 × 80 px .crv-slide elements are centred and then set on a circle: each is turned 72° further than the previous one (rotateY) and pushed 150 px away from the axis (translateZ(150px)). The ring is therefore 300 px across, and the slide passing in front is closer to the eye than the stage: measured face-on it is 141 × 94 px, 18% more than its written size.
The motion is a single animation, crvSpin, which turns the track from 0 to −360° in 20 s, at constant speed and without end: a slide comes face-on every four seconds and leaves towards the left. backface-visibility: hidden wipes out slides seen from behind, otherwise their text would show back to front through the ring. The result: you see two of them, sometimes three — the one facing you and its neighbours, squeezed to 21 px wide when they are almost side-on. The other three gradients wait their turn at the back.
The ring stops so that it can be read: animation-play-state: paused when the mouse is over the stage, when the stage has focus, or when an element placed in a slide has it. It resumes where it stopped. No script: two rings on the same page turn and stop independently (measured: hovering the second does not freeze the first). The root clips whatever sticks out of it, so that a ring wider than the screen adds no horizontal scroll.
Accessibility
- Pause: content that moves for more than five seconds must be stoppable. Measured in all three engines: hovering pauses the animation, so does Tab (the stage carries
tabindex="0", a 2 px lavender outline marks it), and in touch emulation a tap on the stage freezes it for as long as it keeps focus. - Reduced motion: for a visitor who has asked for less animation, the animation is removed. The ring stays still, first slide facing, its two neighbours side-on. The other three are never visible in that case: if each slide carries information, also provide it as a list.
- Screen readers: the stage is a group named by
aria-label(English text to adapt). The five slides are read in HTML order, visible or not, regardless of which one is facing. For a purely decorative ring, usearia-hidden="true"instead and removetabindex. - Links inside slides: possible, but careful. A slide turned to the back is invisible and yet still reachable with Tab: focus lands on something you cannot see. Keep the ring for display and back it up with a real list of links.
- Contrast: 12 px white text on five gradients. Computed from the CSS colours: 4.2:1 to 4.5:1 on the first, violet one; around 3.5:1 on the two pinks; 2.4:1 on the turquoise-green one and 2.1:1 at the orange end of the fourth. Switch those last two to dark text, or darken their gradients.
Browser compatibility
CSS only, 2.6 KB. Verified with Chromium 149, Firefox 151 and WebKit 26.5: same 20 s animation, same pauses on hover and focus, still ring under reduced motion, two independent copies, no horizontal scroll at 320 px. The depth is right in Chromium and Firefox. The WebKit test build, however, draws the five slides flat in a row, the back ones mirrored: that test engine flattens CSS 3D, which says nothing about the real Safari — not verified. Per MDN: transform-style: preserve-3d and perspective since Chrome 36, Firefox 16, Safari 9; unprefixed backface-visibility since Safari 15.4 (the code does not write the -webkit- form); :focus-within since Chrome 60, Firefox 52, Safari 10.1.
Without 3D transforms the five slides pile up in the middle of the stage: only the last one shows. Before Safari 15.4, add -webkit-backface-visibility: hidden to .crv-slide, otherwise slides seen from behind appear mirrored. Without :focus-within, pausing on hover and on stage focus still works.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0019-root">
<div class="demo-3d">
<div class="crv-stage" tabindex="0" role="group" aria-label="…">
<div class="crv-track">
<div class="crv-slide">…</div>
<div class="crv-slide">…</div>
<div class="crv-slide">…</div>
<div class="crv-slide">…</div>
<div class="crv-slide">…</div>
</div>
</div>
</div>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
Turn duration (CSS — animation: crvSpin 20s linear infinite) |
20 s | A slide comes face-on every four seconds. 40 s for a calm backdrop, 9 s for a small indicator. Below 5 s nobody reads any more. |
Direction (CSS — @keyframes crvSpin) |
from 0 to −360°: facing slides leave towards the left | Write rotateY(360deg) in the to step to send them off to the right. |
Radius (CSS — translateZ(150px) in the five .crv-slide:nth-child() rules) |
150 px, i.e. a 300 px ring | At 83 px, five 120 px slides touch edge to edge; at 150 px they are spaced out and you rarely see more than two. Change the value in all five rules. |
Number of slides (HTML + CSS — angle of each rotateY) |
5, every 72° | The angle is 360 divided by the count: 60° for six, 45° for eight. Add one :nth-child() rule per slide and widen the radius so they do not overlap. |
Slide size (CSS — .crv-slide { width; height; margin }) |
120 × 80 px, margins of −40 px and −60 px | The two negative margins are half the height and half the width: they centre the slide on the axis. Change them along with the size. |
Perspective (CSS — .crv-stage { perspective: 1000px }) |
1000 px | 600 px strongly enlarges the facing slide and squashes the side ones; 2000 px flattens the whole thing. |
Pause (CSS — .crv-stage:hover .crv-track and the two focus rules) |
stops on hover, on stage focus and on focus of a child | For a stop driven by a button, apply animation-play-state: paused to .crv-track yourself. Do not remove these rules without offering another way to stop the motion. |
FAQ
animation-delay: -8s; animation-play-state: paused on .crv-track: the ring shows up frozen, third slide facing (checked: 141 × 94 px, centred). Remove paused for it to set off from there.overflow: hidden to .crv-slide and place an image in it with width: 100%; height: 100%; object-fit: cover, or give each :nth-child() a background-image instead of the gradient. Plan for files of at least 290 × 190 px: the facing slide is shown at 141 × 94 px, twice that on a Retina screen. Keep alternative text on every image.