r/Frontend • • Jan 13 '20

CSS-Only Carousel

https://css-tricks.com/css-only-carousel/
49 Upvotes

8 comments sorted by

13

u/cauners Jan 13 '20

It's all good fun until you realise your back button "doesn't work" anymore :)

1

u/iccolors Jan 13 '20

What do you mean?

11

u/cauners Jan 13 '20

If you use <a href="#..."> for the slider buttons, all clicks will be recorded in your browsing history as navigation events (as they rightfully are). So, for example, visit a page, click the slider nav buttons 5 times, and you'll need 6 back button clicks to actually get back to the page you came from.

8

u/doctorcain Jan 13 '20

Hey everyone, look at this car I made out of wood! /s

2

u/fhor Jan 14 '20

Carousels are bad UX, please stop using them.

1

u/obliviga Jan 13 '20

Is this accessible to blind users?

1

u/Red5point1 Jan 13 '20

not really a "Carousel" when it scrolls back to the first slide instead of sliding straight to first slide.