Snippets Card

Bootstrap 5 Parallax Tilt Cards with Hover Depth

Four photo cards that tilt in 3D toward the pointer while the image shifts behind for a parallax depth effect.

Bootstrap 5 No jQuery Oct 2019 2.3K views

<section class="wdw-stage">
  <div class="container" style="max-width:1100px">
    <div class="text-center mb-4 mb-lg-5">
      <span class="wdw-eyebrow">Destinations</span>
      <h2 class="wdw-heading display-6 mt-1 mb-2">Hover to explore</h2>
      <p class="wdw-muted mb-0">Cards tilt toward your pointer while the photo drifts behind for depth.</p>
    </div>
    <div class="row g-3 g-lg-4">
      <div class="col-6 col-lg-3">
        <a href="#" class="depth-card" aria-label="Canyons, red rock country">
          <span class="depth-card__bg" style="background-image:url('https://images.unsplash.com/photo-1479660656269-197ebb83b540?auto=format&fit=crop&w=800&q=80')"></span>
          <span class="depth-card__body"><span class="badge text-bg-light rounded-pill mb-2">12 trails</span><strong class="d-block fs-4">Canyons</strong><span class="small opacity-75">Red rock and golden light</span></span>
        </a>
      </div>
      <div class="col-6 col-lg-3">
        <a href="#" class="depth-card" aria-label="Beaches, quiet coastlines">
          <span class="depth-card__bg" style="background-image:url('https://images.unsplash.com/photo-1479659929431-4342107adfc1?auto=format&fit=crop&w=800&q=80')"></span>
          <span class="depth-card__body"><span class="badge text-bg-light rounded-pill mb-2">8 coves</span><strong class="d-block fs-4">Beaches</strong><span class="small opacity-75">Quiet coastlines</span></span>
        </a>
      </div>
      <div class="col-6 col-lg-3">
        <a href="#" class="depth-card" aria-label="Trees, old growth forest">
          <span class="depth-card__bg" style="background-image:url('https://images.unsplash.com/photo-1479644025832-60dabb8be2a1?auto=format&fit=crop&w=800&q=80')"></span>
          <span class="depth-card__body"><span class="badge text-bg-light rounded-pill mb-2">20 walks</span><strong class="d-block fs-4">Trees</strong><span class="small opacity-75">Old growth forest</span></span>
        </a>
      </div>
      <div class="col-6 col-lg-3">
        <a href="#" class="depth-card" aria-label="Lakes, still mountain water">
          <span class="depth-card__bg" style="background-image:url('https://images.unsplash.com/photo-1479621051492-5a6f9bd9e51a?auto=format&fit=crop&w=800&q=80')"></span>
          <span class="depth-card__body"><span class="badge text-bg-light rounded-pill mb-2">6 lakes</span><strong class="d-block fs-4">Lakes</strong><span class="small opacity-75">Still mountain water</span></span>
        </a>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.