Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sì: puoi creare una carousel orizzontale senza JavaScript usando una lista HTML, lo scorrimento CSS e scroll-snap. I nuovi pseudo-elementi ::scroll-button() e ::scroll-marker possono aggiungere pulsanti e indicatori generati dal browser, ma il loro supporto non è universale. Perciò la carousel dovrebbe restare utilizzabile tramite swipe, trackpad o scrollbar anche quando quei controlli non sono disponibili.

Costruisci prima la carousel scorrevole

La base è un contenitore con scorrimento orizzontale e una lista di elementi. Con scroll-snap-type il browser può allineare ciascun elemento al termine dello scorrimento; i controlli generati sono un miglioramento separato, non un requisito per la carousel.

<ul class="carousel" aria-label="Articoli in evidenza">
  <li class="carousel__slide">...</li>
  <li class="carousel__slide">...</li>
  <li class="carousel__slide">...</li>
</ul>
.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: inline mandatory;
  padding: 0 1rem 1rem;
  margin: 0;
  list-style: none;
}

.carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

L’asse logico inline evita di vincolare la regola all’asse fisico orizzontale quando cambia la direzione di scrittura. Per una spiegazione dei concetti e delle proprietà di Scroll Snap, consulta la guida MDN ai concetti di base di scroll snap.

Scegli tra mandatory e proximity

Valore Comportamento Quando considerarlo
mandatory Forza l’allineamento a un punto di snap al termine dello scorrimento. Slide di dimensioni e contenuto controllati, quando si vuole una paginazione regolare.
proximity Lascia al browser la decisione di agganciare la posizione quando il punto di arrivo è abbastanza vicino. Contenuti variabili per cui uno snap meno rigido può risultare più adatto.

Evita mandatory se una slide può essere più grande dell’area visibile: l’allineamento forzato può impedire di raggiungere tutta la parte eccedente. MDN descrive questa differenza nella stessa guida a Scroll Snap.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Aggiungi pulsanti nativi solo come miglioramento progressivo

CSS Overflow introduce ::scroll-button(left) e ::scroll-button(right). Quando content ha un valore diverso da none, il browser genera i pulsanti e li collega allo scroller; li disabilita automaticamente quando si raggiunge il rispettivo limite. Il team Chrome ha dichiarato che ::scroll-button() è arrivato in Chrome 135: questo dato riguarda Chrome e non prova il supporto nelle altre famiglie di browser.

.carousel::scroll-button(left) {
  content: "Previous";
}

.carousel::scroll-button(right) {
  content: "Next";
}

Il testo deve comunicare azione e direzione: non affidarti a una freccia grafica da sola. Aggiungi uno stile di focus ben visibile e verifica il nome accessibile effettivamente esposto dal browser. La documentazione MDN mostra anche il posizionamento tramite anchor positioning, ma pulsanti generati e anchor positioning sono funzionalità distinte: controlla separatamente il supporto richiesto dai browser dei tuoi utenti. Consulta gli esempi e le note di accessibilità in Creating CSS carousels di MDN e lo stato segnalato dal team Chrome nel riepilogo Web UI di I/O 2025.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Genera marker di navigazione con nomi significativi

I marker CSS possono fornire destinazioni di navigazione associate agli elementi dello scroller. Sul contenitore imposta scroll-marker-group: before o scroll-marker-group: after; sugli elementi genera ::scroll-marker con contenuto che identifichi la destinazione. :target-current consente di distinguere il marker associato alla posizione corrente.

.carousel {
  scroll-marker-group: after;
}

.carousel__slide::scroll-marker {
  content: attr(data-label);
}

.carousel__slide::scroll-marker:target-current {
  /* Stile del marker relativo alla posizione corrente */
}

In questo esempio ogni slide dovrebbe avere un attributo data-label descrittivo. Un marker con content: "" ha un nome accessibile vuoto; evita di usarlo come indicatore muto. Se le etichette sono generate da attributi, verifica anche la localizzazione: il testo CSS non viene necessariamente intercettato dai servizi di traduzione automatica. Per i dettagli sui marker e sullo pseudo-elemento :target-current, consulta la specifica W3C CSS Overflow Module Level 5 e gli esempi MDN per le carousel CSS.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Progetta l’accessibilità in base al tipo di carousel

Prima di scegliere ruoli, annunci e comportamento del focus, chiarisci che cosa rappresenta il componente. Una slideshow mostra un elemento interattivo alla volta; una carousel paginata può mostrare più elementi per pagina; una striscia a scorrimento continuo mostra più schede senza pagine fisse. Non sono modelli intercambiabili, e i controlli CSS generati non rendono automaticamente accessibile ogni configurazione.

  • Dai alla regione un nome comprensibile, per esempio con un’etichetta associata a un elenco semanticamente appropriato.
  • Verifica l’ordine di navigazione da tastiera e assicurati che i controlli di slide fuori schermo non restino raggiungibili in modo inatteso.
  • Fornisci nomi distinti ai marker quando possibile e rendi visibile il focus.
  • Controlla annunci e interazione con tecnologie assistive per il modello effettivamente implementato.

Chrome for Developers discute l’uso di scroll-state e interactivity: inert per rendere non interattivi gli elementi inattivi in una slideshow, ma non presenta questi strumenti come un sostituto dei test di accessibilità. Inoltre, il pattern responsive a colonne multiple illustrato da MDN ha una limitazione specifica: non dispone attualmente di un elemento sorgente da cui derivare un nome accessibile per i marker. Non adottarlo senza risolvere il problema nome/ruolo/valore, ad esempio scegliendo una struttura con un nome disponibile per ciascuna destinazione. Leggi le indicazioni di Chrome in Make accessible carousels e le note MDN sulle carousel CSS.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verifica il supporto prima di dipendere dai controlli generati

CSS Scroll Snap è la base del pattern; pulsanti e marker appartengono alle capacità più recenti di CSS Overflow. Il W3C pubblica CSS Overflow Module Level 5 come Working Draft, non come garanzia di supporto uniforme. Le fonti citate non costituiscono una matrice aggiornata per tutte le versioni dei browser, e supporto a scroll button, marker, anchor positioning e scroll-state non va dato per scontato come un unico pacchetto.

  1. Controlla il supporto delle funzionalità specifiche sui browser e sulle versioni usati dal tuo pubblico.
  2. Prova la carousel senza pulsanti e marker: lo scorrimento di base deve funzionare con gesto, trackpad o scrollbar.
  3. Prova separatamente navigazione da tastiera, focus, nomi accessibili e comportamento degli elementi fuori schermo.
  4. Se una funzionalità generata non è disponibile, mantieni il contenuto raggiungibile invece di rendere la navigazione dipendente da essa.

Per lo stato dello standard consulta il W3C CSS Overflow Module Level 5; per gli esempi di implementazione e le limitazioni documentate, consulta MDN Creating CSS carousels.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.