Testimonial Slide Layout
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
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Testimonial Layouts</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <body> <div class="container"> <header> <h1> Testimonial Layout</h1> <p class="subtitle">Explore unique ways to showcase customer testimonials with these innovative designs</p> </header> <section id="overlap-layout" class="layout-section active"> <div class="overlapping-container"> <!-- Testimonial 1 --> <div class="overlap-card active"> <i class="fas fa-quote-left quote-icon"></i> <p class="testimonial-text"> "This platform has revolutionized our workflow. We've seen a 60% increase in productivity and our team is happier than ever. The implementation was seamless and the support team is incredibly responsive." </p> <div class="client-info"> <img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="Sarah Johnson" class="client-avatar"> <div class="client-details"> <h4>Sarah Johnson</h4> <p>Customer Success Manager</p> </div> </div> </div> <!-- Testimonial 2 --> <div class="overlap-card next"> <i class="fas fa-quote-left quote-icon"></i> <p class="testimonial-text"> "Our customer satisfaction scores have skyrocketed since implementing this solution. The analytics dashboard provides incredible insights that help us make data-driven decisions." </p> <div class="client-info"> <img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="Michael Chen" class="client-avatar"> <div class="client-details"> <h4>Michael Chen</h4> <p>Data Analyst</p> </div> </div> </div> <!-- Testimonial 3 --> <div class="overlap-card prev"> <i class="fas fa-quote-left quote-icon"></i> <p class="testimonial-text"> "As a startup, we needed a solution that could scale with our growth. This platform has exceeded our expectations in every way. The flexibility and customization options are outstanding." </p> <div class="client-info"> <img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="Maria Rodriguez" class="client-avatar"> <div class="client-details"> <h4>Maria Rodriguez</h4> <p>Startup Founder</p> </div> </div> </div> </div> <div class="overlap-controls"> <button class="overlap-btn prev-btn"> <i class="fas fa-chevron-left"></i> </button> <button class="overlap-btn next-btn"> <i class="fas fa-chevron-right"></i> </button> </div> </section> </div> </body> </html>
CSS
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } :root { --primary: #6a11cb; --secondary: #2575fc; --accent: #ff6b6b; --light: #f8f9fa; --dark: #212529; --gray: #6c757d; --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); } body { background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); min-height: 100vh; padding: 40px 20px; color: var(--dark); } .container { max-width: 1200px; margin: 0 auto; } header { text-align: center; margin-bottom: 60px; } h1 { font-size: 2.8rem; margin-bottom: 15px; background: linear-gradient(to right, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; } .subtitle { font-size: 1.2rem; color: var(--gray); max-width: 700px; margin: 0 auto; line-height: 1.6; } .layout-selector { display: flex; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; gap: 15px; } .layout-btn { padding: 12px 25px; background: white; border: 2px solid #e0e0e0; border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 8px; } .layout-btn.active { background: linear-gradient(to right, var(--primary), var(--secondary)); color: white; border-color: transparent; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .layout-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); } .layout-section { display: none; animation: fadeIn 0.5s ease forwards; } .layout-section.active { display: block; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* Layout 2: Overlapping Cards */ .overlapping-container { position: relative; height: 500px; margin: 0 auto; max-width: 800px; } .overlap-card { position: absolute; width: 100%; background: white; border-radius: 20px; padding: 40px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); transition: var(--transition); opacity: 0; transform: scale(0.9) translateY(20px); } .overlap-card.active { opacity: 1; transform: scale(1) translateY(0); z-index: 3; } .overlap-card.prev { opacity: 0.7; transform: scale(0.95) translateY(-20px) translateX(-30px); z-index: 2; } .overlap-card.next { opacity: 0.7; transform: scale(0.95) translateY(-20px) translateX(30px); z-index: 2; } .overlap-card .quote-icon { font-size: 3rem; color: var(--primary); margin-bottom: 25px; opacity: 0.8; } .overlap-card .testimonial-text { font-size: 1.3rem; line-height: 1.8; color: var(--dark); margin-bottom: 30px; font-style: italic; } .overlap-card .client-info { display: flex; align-items: center; } .overlap-card .client-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin-right: 20px; border: 4px solid #f0f0f0; } .overlap-card .client-details h4 { font-size: 1.4rem; margin-bottom: 5px; } .overlap-card .client-details p { color: var(--gray); font-size: 1rem; } .overlap-controls { display: flex; justify-content: center; margin-top: 30px; gap: 15px; } .overlap-btn { width: 50px; height: 50px; border-radius: 50%; background: white; border: 2px solid #e0e0e0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); font-size: 1.2rem; } .overlap-btn:hover { background: var(--primary); color: white; border-color: var(--primary); } /* Responsive Design */ @media (max-width: 992px) { .side-by-side-container { flex-direction: column; } .side-card { min-width: 100%; } } @media (max-width: 768px) { h1 { font-size: 2.2rem; } .overlapping-container { height: 450px; } .overlap-card { padding: 30px; } .overlap-card .testimonial-text { font-size: 1.1rem; } .timeline-container::before { left: 30px; } .timeline-card { width: calc(100% - 70px); left: 70px !important; } .timeline-card::before { left: -40px !important; } .layout-btn { padding: 10px 20px; font-size: 0.9rem; } } @media (max-width: 576px) { h1 { font-size: 1.8rem; } .subtitle { font-size: 1rem; } .overlapping-container { height: 500px; } .overlap-card { padding: 25px; } .overlap-card .testimonial-text { font-size: 1rem; } .overlap-card .client-avatar { width: 60px; height: 60px; } .side-card, .timeline-card { padding: 20px; } .layout-btn { width: 100%; justify-content: center; } }
JavaScript
document.addEventListener('DOMContentLoaded', function() { const layoutButtons = document.querySelectorAll('.layout-btn'); const layoutSections = document.querySelectorAll('.layout-section'); // Switch between layouts layoutButtons.forEach(button => { button.addEventListener('click', function() { const layout = this.getAttribute('data-layout'); // Update active button layoutButtons.forEach(btn => btn.classList.remove('active')); this.classList.add('active'); // Show selected layout layoutSections.forEach(section => section.classList.remove('active')); document.getElementById(`${layout}-layout`).classList.add('active'); }); }); // Overlapping cards functionality const overlapCards = document.querySelectorAll('.overlap-card'); const prevBtn = document.querySelector('.overlap-btn.prev-btn'); const nextBtn = document.querySelector('.overlap-btn.next-btn'); let currentOverlapIndex = 0; function updateOverlapCards() { overlapCards.forEach((card, index) => { card.classList.remove('active', 'prev', 'next'); if (index === currentOverlapIndex) { card.classList.add('active'); } else if (index === (currentOverlapIndex - 1 + overlapCards.length) % overlapCards.length) { card.classList.add('prev'); } else if (index === (currentOverlapIndex + 1) % overlapCards.length) { card.classList.add('next'); } }); } prevBtn.addEventListener('click', function() { currentOverlapIndex = (currentOverlapIndex - 1 + overlapCards.length) % overlapCards.length; updateOverlapCards(); }); nextBtn.addEventListener('click', function() { currentOverlapIndex = (currentOverlapIndex + 1) % overlapCards.length; updateOverlapCards(); }); // Initialize overlapping cards updateOverlapCards(); });
Output Preview
Desktop
Mobile
Fullscreen