demo · v140

Anchor Carousel

Regular anchors can be the carousel markers. Toggle the marker group on and off, move with buttons or arrow keys, and watch each carousel maintain its own :target-current state.

scroll-target-group

checking

:target-current

checking

keyboard

Focus either slide rail and use left/right arrows; the active marker readout updates.

nav.markers { scroll-target-group: auto; }
nav.markers a:target-current { background: var(--text-black); color: var(--bg-ivory); }

see also