I set myself a small challenge: build a clean sliding image gallery without touching JavaScript. No libraries, no frameworks, no JS at all — just HTML and CSS.

Tech Stack

HTML · CSS

Live Demo

https://polite-twilight-82e0a6.netlify.app/

Overview

The idea was simple — a horizontal image track that scrolls smoothly. But the constraint (no JS) forced me to think differently about layout, animation, and interaction.

CSS animations and transitions did all the heavy lifting. The trick was getting the timing and easing curves right so it feels natural rather than robotic. A little cubic-bezier() tweaking goes a long way.

I also made sure the component is responsive — it shrinks down gracefully without breaking layout — and easy to drop into any static page with minimal markup.

What I Learned

  • Small CSS decisions matter more than you’d think. The difference between ease-in-out and a custom bezier curve is the difference between “okay” and “feels right.”
  • No-JS constraints force cleaner structure. When you can’t hide behind JavaScript, your HTML has to carry its weight. The markup ends up simpler and more semantic.
  • Responsive behavior is easier when the base layout isn’t fighting a bunch of JS calculations.

What I’d Add Next

  • Keyboard-friendly controls (left/right arrows to navigate)
  • Optional captions and image metadata
  • A second version with touch drag support (would need a little JS, but worth it)