StealThis .dev

Parallax Depth Card Grid

Cards positioned at different Z-depth layers reveal with staggered 3D entrance animations. Hover lifts cards forward. Depth-based scroll parallax creates cinematic feel.

Open in Lab
gsapscrolltriggercss-3dperspectivelenis
Targets: JS HTML

Code

:root {
  --bg: #070a12;
  --text: #f0f4fb;
  --panel: #121a2b;
  --border: #263249;
  --accent: #86e8ff;
  --muted: #8a95a8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(134, 232, 255, 0.05) 0%, rgba(174, 82, 255, 0.05) 100%);
}

.hero .content {
  max-width: 600px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
}

/* Cards Container with Perspective */
.cards-container {
  padding: 6rem 2rem;
  background: rgba(18, 26, 43, 0.5);
  perspective: 1200px;
}

.cards-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  perspective-origin: center center;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card:hover {
  border-color: var(--accent);
  background: rgba(134, 232, 255, 0.08);
}

.card-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent);
  opacity: 0.8;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Details Section */
.details {
  max-width: 800px;
  margin: 4rem auto;
  padding: 4rem 2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 26, 43, 0.8);
}

.details .content {
  max-width: 800px;
  margin: 0 auto;
}

.details h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.details h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.details p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.details ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.details li {
  color: var(--muted);
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.details li strong {
  color: var(--accent);
}

code {
  background: rgba(134, 232, 255, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
}

.btn-back {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: rgba(134, 232, 255, 0.8);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .details {
    margin: 2rem auto;
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .card-icon {
    font-size: 2.5rem;
  }

  .card h3 {
    font-size: 1.1rem;
  }
}

html.reduced-motion .card,
html.reduced-motion .hero {
  animation: none !important;
}

html.reduced-motion * {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

Parallax Depth Card Grid

Cards positioned at different Z-depth layers reveal with staggered 3D entrance animations. Hover lifts cards forward. Depth-based scroll parallax creates cinematic feel.

Source

  • Repository: libs-genclaude
  • Original demo id: 38-parallax-depth-cards

Notes

Cards positioned at different Z-depth layers reveal with staggered 3D entrance animations. Hover lifts cards forward. Depth-based scroll parallax creates cinematic feel.