What Our Clients Say
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>CSS Testimonial Slider</title> </head> <body> <section class="testimonial-section"> <h2 class="section-title">What Our Clients Say</h2> <div class="testimonial-slider"> <input type="radio" name="slider" id="slide1" checked> <input type="radio" name="slider" id="slide2"> <input type="radio" name="slider" id="slide3"> <input type="radio" name="slider" id="slide4"> <div class="slides"> <!-- Slide 1 --> <div class="slide"> <div class="testimonial"> <img src="https://randomuser.me/api/portraits/women/43.jpg" alt="Client" class="client-image"> <p class="testimonial-text"> "This service completely transformed our business. The team was professional, responsive, and delivered beyond our expectations. Highly recommended!" </p> <h3 class="client-name">Sarah Johnson</h3> <p class="client-title">CEO, TechSolutions Inc.</p> </div> </div> <!-- Slide 2 --> <div class="slide"> <div class="testimonial"> <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Client" class="client-image"> <p class="testimonial-text"> "I've worked with many companies over the years, but none have shown the level of dedication and expertise that this team demonstrates every day." </p> <h3 class="client-name">Michael Chen</h3> <p class="client-title">Marketing Director, Global Corp</p> </div> </div> <!-- Slide 3 --> <div class="slide"> <div class="testimonial"> <img src="https://randomuser.me/api/portraits/women/65.jpg" alt="Client" class="client-image"> <p class="testimonial-text"> "The results speak for themselves. Our productivity increased by 40% after implementing their solution. Worth every penny!" </p> <h3 class="client-name">Lisa Rodriguez</h3> <p class="client-title">Operations Manager, BrightFuture</p> </div> </div> <!-- Slide 4 --> <div class="slide"> <div class="testimonial"> <img src="https://randomuser.me/api/portraits/men/75.jpg" alt="Client" class="client-image"> <p class="testimonial-text"> "Exceptional service from start to finish. They took the time to understand our unique needs and delivered a customized solution that works perfectly." </p> <h3 class="client-name">David Wilson</h3> <p class="client-title">Founder, Startup Ventures</p> </div> </div> </div> <!-- Pagination Dots --> <div class="dots"> <label for="slide1" class="dot"></label> <label for="slide2" class="dot"></label> <label for="slide3" class="dot"></label> <label for="slide4" class="dot"></label> </div> </div> </section> </body> </html>
CSS
/* Base Styles */ * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Arial', sans-serif; line-height: 1.6; background-color: #f5f5f5; padding: 20px; } .testimonial-section { max-width: 1200px; margin: 0 auto; padding: 40px 20px; } .section-title { text-align: center; margin-bottom: 40px; color: #333; font-size: 2rem; } /* Slider Container */ .testimonial-slider { position: relative; width: 100%; overflow: hidden; margin: 0 auto; } /* Slides Container */ .slides { display: flex; transition: transform 0.5s ease-in-out; width: 100%; } /* Individual Slide */ .slide { min-width: 100%; padding: 0 20px; transition: opacity 0.5s ease; } .testimonial { background: white; border-radius: 10px; padding: 30px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); text-align: center; position: relative; } .testimonial:after { content: '"'; font-size: 80px; color: rgba(0, 0, 0, 0.05); position: absolute; top: 10px; left: 20px; line-height: 1; } .client-image { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); margin: 0 auto 15px; display: block; } .testimonial-text { color: #555; font-style: italic; margin-bottom: 20px; font-size: 1.1rem; } .client-name { font-weight: bold; color: #333; font-size: 1.2rem; margin-bottom: 5px; } .client-title { color: #777; font-size: 0.9rem; } /* Pagination Dots */ .dots { display: flex; justify-content: center; margin-top: 30px; } .dot { width: 12px; height: 12px; border-radius: 50%; background: #ccc; margin: 0 5px; cursor: pointer; transition: background 0.3s ease; } .dot:hover { background: #999; } /* Radio Inputs for Slide Control */ input[type="radio"] { display: none; } /* Slide Navigation */ #slide1:checked ~ .slides { transform: translateX(0%); } #slide2:checked ~ .slides { transform: translateX(-100%); } #slide3:checked ~ .slides { transform: translateX(-200%); } #slide4:checked ~ .slides { transform: translateX(-300%); } /* Active Dot Styling */ #slide1:checked ~ .dots label[for="slide1"], #slide2:checked ~ .dots label[for="slide2"], #slide3:checked ~ .dots label[for="slide3"], #slide4:checked ~ .dots label[for="slide4"] { background: #4a6fa5; } /* Responsive Adjustments */ @media (max-width: 768px) { .testimonial { padding: 20px; } .testimonial-text { font-size: 1rem; } .client-name { font-size: 1.1rem; } } @media (max-width: 480px) { .testimonial-section { padding: 20px 10px; } .testimonial { padding: 15px; } .client-image { width: 60px; height: 60px; } }
JavaScript
Output Preview
Desktop
Mobile
Fullscreen