Holographic Glass Tilt Card — 3D CSS & JS Animation
The Holographic Glass Tilt effect combines modern glassmorphism (frosted glass) with 3D perspective and a dynamic holographic sheen. As the user moves their mouse over the card, it tilts to follow the cursor, while a “rainbow” light reflection shifts across the surface, mimicking the behavior of a physical holographic collector’s card or a high-end credit card.
How It Works
The 3D tilt is handled by a JavaScript event listener that calculates the mouse position relative to the card’s center. It then applies a rotateX and rotateY transform. The holographic sheen is a linear-gradient overlay with mix-blend-mode: overlay or color-dodge. By updating the background-position of this gradient based on the mouse coordinate, the reflection appears to “roll” over the card as it tilts. backdrop-filter: blur() provides the core frosted glass aesthetic.
Use Cases
- Premium product cards in e-commerce
- Profiles or “Contact Us” cards in design portfolios
- NFT or collectible card displays
- Highlighted features on a pricing page
How to Customize
- Tilt Sensitivity: Change the divisor in the
rotateXandrotateYcalculations (higher numbers = more subtle tilt). - Holographic Colors: Modify the
linear-gradientin the.glowclass to include more vibrant colors or different angles. - Glass Intensity: Adjust the
backdrop-filter: blur(10px)and thebackground: rgba(...)opacity. - Add “Pop-out” Content: Use
transform: translateZ(50px)on child elements to make them appear to float above the card surface in 3D space.
Frequently Asked Questions
Does this work on mobile?
Hover-based tilt and reflection don’t work on touchscreens. The card will appear as a high-quality static glassmorphism card on mobile devices, which remains a professional and clean design Choice.
Why use perspective on the body?
For 3D rotations to look “realistic” (with vanishing points), the parent container must have a perspective value. Without it, the card would simply distort flatly instead of appearing to tilt toward or away from the viewer.
Can I use this for a whole grid?
Yes, but be mindful that backdrop-filter can be demanding on GPUs. For a grid of 12+ cards, you might want to reduce the blur radius or only enable the tilt on the currently hovered card to ensure smooth performance.