Floating Card
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<div class="floating-card-container"> <div class="floating-card"> <div class="card-image"> <img src="https://images.unsplash.com/photo-1545205597-3d9d02c29597?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="AI Design"> </div> <div class="card-content"> <h3 class="card-title">AI-Powered Creativity</h3> <p class="card-description"> Experience the future of design with AI-driven solutions and seamless user experiences. </p> <button class="floating-button">Discover More</button> </div> </div> </div>
CSS
/* General Styling */ body { margin: 0; font-family: 'Roboto', sans-serif; background: radial-gradient(circle, #1a1a2e, #16213e); display: flex; justify-content: center; align-items: center; height: 100vh; } /* Floating Card Container */ .floating-card-container { perspective: 1000px; display: flex; justify-content: center; align-items: center; } /* Floating Card */ .floating-card { width: 400px; background: linear-gradient(145deg, #1e293b, #2a3e55); border-radius: 20px; box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5), inset 5px 5px 15px rgba(255, 255, 255, 0.1); overflow: hidden; position: relative; transition: transform 0.5s ease, box-shadow 0.5s ease; } .floating-card:hover { transform: translateY(-20px) rotateX(5deg) rotateY(5deg); box-shadow: 0 30px 50px rgba(0, 0, 0, 0.7); } /* Card Image */ .card-image img { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid rgba(255, 255, 255, 0.2); } /* Card Content */ .card-content { padding: 20px; text-align: center; } .card-title { font-size: 1.8rem; color: #fff; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; } .card-description { font-size: 1rem; color: rgba(255, 255, 255, 0.8); margin-bottom: 20px; line-height: 1.6; } /* Button */ .floating-button { padding: 10px 25px; background: linear-gradient(90deg, #ff007a, #00d4ff); border: none; border-radius: 25px; color: #fff; font-size: 1rem; font-weight: bold; cursor: pointer; box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4); transition: all 0.3s ease; } .floating-button:hover { transform: translateY(-5px); box-shadow: 0 6px 20px rgba(0, 212, 255, 0.7); }
JavaScript
Output Preview
Desktop
Mobile
Fullscreen