Elastic Columns Scroll Animation

Gallery columns scroll at different speeds, so the grid stretches and catches up. Preview it, adjust the scroll length and smoothing, and copy the HTML, CSS and JavaScript.

When to use Elastic Columns

Use it for photo archives, mood boards and lookbooks, where texture matters more than reading order.

Paste the HTML where the section should go, add the CSS to your stylesheet, and load the JavaScript once at the end of the page. This effect is a fresh build of the pattern from Codrops Elastic Grid Scroll.

More scroll animations

  • Gallery to Hero: A photo grid zooms in until the middle picture fills the screen and becomes the hero.
  • Stacking Cards: Each card slides up over the last one, which shrinks back into a neat stack.
  • Horizontal Gallery: The page pins and a row of pictures slides sideways as you keep scrolling down.
  • Tilted Hero Rows: Rows of work start tilted back in 3D, then flatten and slide apart as the headline clears.
  • Tilt-Up Screen: A product screenshot lies tilted back, then stands up flat to face the visitor.
  • Sticky Story: Text steps scroll past on the left while the picture on the right swaps to match.
  • Zoom-Through Title: A giant word grows until you fly through a letter into the next scene.

Frequently Asked Questions

How do I change the speed of one column?

Each column has a --s value between 0 and 1 in the HTML. Lower numbers move more slowly.