Skip to content

3D Tilt Parallax Card (with dynamic glare) using plain HTML, CSS & JavaScript! - Move your cursor (or finger) and watch the card tilt, the content pop with parallax, and a glossy highlight follow you. - Great for product cards, CTAs, and portfolio grids. No libraries, just clean front-end wizardry

codewithoyem/3d-tilt-parallax-card-100daysofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 3D Tilt Parallax Card (with Glare)

A premium-looking, responsive 3D card built with HTML, CSS, and JavaScript. It tilts toward your cursor/touch, adds parallax depth to content, and renders a glossy glare that follows the pointer — perfect for product cards, portfolio items, or CTAs.


📑 Table of Contents


✨ Features

  • 🌀 Smooth 3D tilt using pointer position
  • 🌊 Parallax depth for image, text, and buttons
  • ✨ Dynamic glare highlight that follows the cursor
  • 📱 Touch-friendly with graceful fallback
  • 🧠 Pure HTML, CSS & JavaScript (no libraries)

🖼 Preview

3D Tilt Parallax Card Preview


📁 File Structure

  • index.html: Markup with three demo cards (data-tilt)
  • style.css: 3D styles, parallax layers, glare visuals, responsive grid
  • script.js: Pointer tracking, physics-like easing, tilt + glare logic

🌐 Live Demo

🔗 View Live Demo


⚙️ Installation

  1. Clone the repository:

    git clone https://github.com/codewithoyem/3d-tilt-parallax-card-100daysofcode.git
    cd 3d-tilt-parallax-card-100daysofcode
    
  2. Open the HTML file:

    open index.html


🚀 Usage

  1. Open the page and hover or touch a card.
  2. The card tilts up to ±12°, content pops with parallax, and a glare follows your pointer.
  3. Duplicate the <article class="card" data-tilt>...</article> block to add more items.

Customize in script.js:

  • MAX_TILT → tilt intensity (degrees)
  • GLARE_MOVE → glare travel
  • REST_EASE → how springy/smooth the return is

Swap images/text directly in index.html.


🤝 Contributing

Feel free to fork, improve, or customize!

  1. Fork this repository
  2. Create a new branch
  3. Make your changes
  4. Submit a Pull Request

📬 Contact


📄 License

This project is licensed under the MIT License and is available for use under the MIT License.

About

3D Tilt Parallax Card (with dynamic glare) using plain HTML, CSS & JavaScript! - Move your cursor (or finger) and watch the card tilt, the content pop with parallax, and a glossy highlight follow you. - Great for product cards, CTAs, and portfolio grids. No libraries, just clean front-end wizardry

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published