StealThis .dev

Horizontal Pinned Gallery

Pinned section with horizontal gallery movement tied to scroll progress.

Open in Lab
gsapscrolltriggerparallax
Targets: JS HTML

Code

body { margin: 0; font-family: "Avenir Next", sans-serif; background: #070c15; color: #f2f7ff; overflow-x: hidden; }
.back { position: fixed; top: 14px; left: 14px; color: #86e8ff; text-decoration: none; z-index: 20; }
.intro,.outro { min-height: 70vh; display: grid; place-content: center; text-align: center; }
.pin-wrap { height: 100vh; overflow: hidden; }
.track { height: 100%; display: flex; gap: 1rem; align-items: center; padding: 0 6vw; }
.card { min-width: min(70vw, 620px); height: 70vh; border-radius: 18px; display: grid; place-content: center; font-size: clamp(1.8rem, 5vw, 3rem); background: linear-gradient(135deg, #203451, #6f3db1); border: 1px solid #3c4f71; }

body.no-motion .pin-wrap { height: auto; overflow: visible; padding: 1rem 0 2rem; }
body.no-motion .track { height: auto; flex-direction: column; align-items: stretch; padding: 0 4vw; }
body.no-motion .card { min-width: 100%; width: 100%; height: 44vh; }

Pinned section with horizontal gallery movement tied to scroll progress.

Source

  • Repository: libs-gen
  • Original demo id: 04-horizontal-pinned-gallery

Notes

Pinned section with horizontal gallery movement tied to scroll progress.