DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
3D Tilt Card - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
3D Tilt Card
abhishek001
Jan 25, 2026
2
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="tilt-card"> <div class="card-inner"> <div class="card-icon">🚀</div> <h3>3D Tilt Card</h3> <p>Hover to see the 3D tilt effect. Perfect for interactive previews.</p> <button class="card-btn">View Demo</button> </div> </div>
1
.tilt-card { width: 100%; max-width: 320px; height: 350px; background: #121826; border-radius: 20px; overflow: hidden; position: relative; color: #e2e8f0; font-family: 'Inter', sans-serif; /* Enable 3D space */ transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); } /* Glowing border on hover */ .tilt-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 20px; padding: 2px; background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; z-index: -1; opacity: 0; transition: opacity 0.4s ease; } .tilt-card:hover::before { opacity: 1; } .card-inner { padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; height: 100%; gap: 18px; position: relative; z-index: 2; } .card-icon { font-size: 32px; background: rgba(99, 102, 241, 0.15); width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); border: 1px solid rgba(99, 102, 241, 0.3); } .card-inner h3 { margin: 0; font-size: 18px; font-weight: 600; color: #f1f5f9; } .card-inner p { margin: 0; font-size: 14px; line-height: 1.5; color: #cbd5e1; max-width: 260px; } .card-btn { background: transparent; border: 1.5px solid #6366f1; color: #c7d2fe; padding: 8px 24px; border-radius: 30px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; } .card-btn:hover { background: rgba(99, 102, 241, 0.2); color: white; }
1
(function() { const card = document.getElementById('card'); if (card) { // Small delay to ensure render setTimeout(() => { card.classList.add('animate-in'); }, 100); // Optional: Notify parent (your platform) that animation is ready if (window.parent !== window) { window.parent.postMessage('componentLoaded', '*'); } } })();
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!