日本語

How to use CSS Carousel Examples

Add a carousel to your page in three steps. Open the tool

Steps

FAQ

Can I build a carousel with CSS only?

Yes. Use scroll-snap for swiping, @keyframes for auto-scrolling and 3D transforms for spirals. Most carousels here use no JavaScript, and the ones that do are marked JS.

Which carousels move on their own?

The infinite marquee and the two-row reverse marquee. The set is repeated twice and moved by half its width so there is no seam. The helix, tornado and double helix also keep moving.

Can people swipe on mobile?

Scroll snap, buttons and dots, center zoom and coverflow can all be swiped. The spiral types are drawn smaller on screens 600px wide or less.

Do any types fail in Safari or Firefox?

No. Buttons and dots, center zoom, coverflow, parallax, blur at the edges and the scroll-driven types run on CSS in Chrome and Edge, and a short JS snippet in the code does the same job in other browsers.

How does the spiral carousel work?

One @keyframes animates height (translateY), angle (rotateY) and radius (translateZ) together, and each card gets a negative animation-delay so the cards sit along the spiral.

What about people who prefer reduced motion?

The exported code includes prefers-reduced-motion, so the auto-moving types stay still for those users.

How do I use my own images?

Put an img element or a background-image inside each cg-card element. The color gradient comes from the .cg-card background, so you can remove it when you use images.

Other carousel tools