Create 100+ Carousel Effects with Just a Few Lines of CSS in Chrome 135

Chrome 135’s CSS Overflow 5 spec introduces the ::scroll-button() and ::scroll-marker() pseudo‑elements, letting developers build over a hundred carousel styles using only CSS, eliminating JavaScript, improving performance, and adding built‑in accessibility features.

Full-Stack Cultivation Path
Full-Stack Cultivation Path
Full-Stack Cultivation Path
Create 100+ Carousel Effects with Just a Few Lines of CSS in Chrome 135

When I first started front‑end development, building a basic carousel required a lot of JavaScript logic. Chrome 135 now adds CSS Overflow 5, which provides two new pseudo‑elements— ::scroll-button() and ::scroll-marker() —that enable a wide range of carousel effects without any JavaScript.

Scroll Button ( ::scroll-button() )

The ::scroll-button() pseudo‑element is a stateful, interactive button that scrolls the container when pressed. It can scroll 85 % of the view, aligning with a single full‑width item in a carousel or moving almost a full page in a long list.

.carousel::scroll-button(left) {
  content: "⬅" / "Scroll Left";
}
.carousel::scroll-button(right) {
  content: "⮕" / "Scroll Right";
}
.carousel::scroll-button(*)::focus-visible {
  outline-offset: 5px;
}

Scroll Marker ( ::scroll-marker() )

The ::scroll-marker() pseudo‑element works like an in‑page link; each marker can represent any item in the scroll track. It includes a :target‑current state to indicate visibility, supports keyboard navigation similar to a focus group, and provides screen‑reader friendly labeling.

Contains a :target-current state for visibility detection.

Supports keyboard navigation, behaving like a focus group.

Offers screen‑reader experience and generates a tab‑list report.

.carousel {
  scroll-marker-group: after;
}
.carousel > li::scroll-marker {
  content: ' ';
}
.carousel > li::scroll-marker:target-current {
  background: var(--accent);
}

Hundreds of Carousel Effects

Combining these two pseudo‑elements, developers can create more than 100 distinct carousel styles.

Horizontal Carousel

The most common form scrolls content horizontally. A simple CSS rule creates a basic horizontal scroll area, suitable for image galleries or product showcases.

Video Carousel

Video carousels display multiple video previews, requiring optimized loading and smooth playback to ensure a fluid viewing experience.

App Switcher Carousel

App‑switcher carousels let users browse multiple applications or large project portfolios from different angles.

Product Showcase Carousel

Widely used on e‑commerce sites, this carousel fully displays product details and features.

3D Carousel

3D carousels render content with three‑dimensional visual effects, attracting attention but requiring careful design and optimization for smooth performance across devices.

Vertical 3D Scroll Carousel

This variant presents content vertically in 3D, offering a unique perspective for creative showcases or attention‑grabbing scenarios.

Advantages and Benefits

No JavaScript : reduces code complexity and improves performance.

Accessibility support : built‑in features make carousels friendlier to assistive technologies.

Performance optimization : eliminating JavaScript lowers load time and runtime overhead.

Higher development efficiency : concise CSS is easier and faster to write.

The Chrome team continues to refine these features and plans future options such as periodic scrolling (carousel‑style looping), further expanding flexibility and user experience.

In summary, Chrome 135’s CSS Overflow 5 spec transforms carousel development by enabling rich, performant, and accessible effects using only CSS.

Official examples: https://chrome.dev/carousel Online carousel configurator:

https://chrome.dev/carousel-configurator/
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performanceAccessibilityWeb DevelopmentChromeCSSCarousel
Full-Stack Cultivation Path
Written by

Full-Stack Cultivation Path

Focused on sharing practical tech content about TypeScript, Vue 3, front-end architecture, and source code analysis.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.