Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- Place the following CSS in your <head> or stylesheet --> <style> /* This is an optional body style to provide a background for the page */ body { background-color: #f3f4f6; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; } /* === Grid Container for the Cards === */ .cards-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; padding: 1.5rem; } /* === Flip Card Styles === */ .flip-card { background-color: transparent; width: 100%; height: 400px; perspective: 1000px; /* Gives the 3D space for the flip */ } /* This container does the flipping */ .flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-radius: 12px; } .flip-card:hover .flip-card-inner { transform: rotateY(180deg); } /* Front and back sides */ .flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; /* For Safari */ backface-visibility: hidden; border-radius: 12px; overflow: hidden; } /* Style the front side */ .flip-card-front { background-color: #e5e7eb; } .flip-card-image { width: 100%; height: 100%; object-fit: cover; } /* Style the back side */ .flip-card-back { background-color: #1f2937; color: white; transform: rotateY(180deg); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem; } .flip-card-back-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.75rem; } .flip-card-back-description { font-size: 1rem; line-height: 1.6; margin: 0 0 1.5rem; } .flip-card-back-link { background-color: #ffffff; color: #1f2937; font-weight: 500; padding: 0.6rem 1.25rem; border-radius: 8px; text-decoration: none; transition: background-color 0.2s, color 0.2s; } .flip-card-back-link:hover { background-color: #4f46e5; color: #ffffff; } </style> <!-- Place the following HTML in your <body> --> <div class="cards-grid-container"> <!-- Card 1 --> <div class="flip-card"> <div class="flip-card-inner"> <div class="flip-card-front"> <!-- Image by placehold.co. Replace with your own. --> <img src="https://placehold.co/640x800/ec4899/ffffff/png?text=Mobile+UI" alt="UI screenshot for the Meridian Finance app." class="flip-card-image"> </div> <div class="flip-card-back"> <h3 class="flip-card-back-title">Meridian Finance App</h3> <p class="flip-card-back-description">A native iOS and Android application for managing personal finances.</p> <a href="#" class="flip-card-back-link">View Project</a> </div> </div> </div> <!-- Card 2 --> <div class="flip-card"> <div class="flip-card-inner"> <div class="flip-card-front"> <!-- Image by placehold.co. Replace with your own. --> <img src="https://placehold.co/640x800/f59e0b/ffffff/png?text=Branding" alt="Branding materials for a coffee company." class="flip-card-image"> </div> <div class="flip-card-back"> <h3 class="flip-card-back-title">Canyon Coffee</h3> <p class="flip-card-back-description">Complete branding and packaging design for an artisanal coffee roaster.</p> <a href="#" class="flip-card-back-link">View Project</a> </div> </div> </div> </div>