Hear from our satisfied customers about their experiences
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Testimonials Slider</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.testimonials-section {
padding: 100px 0;
background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
}
.testimonials-container {
max-width: 900px;
margin: 0 auto;
position: relative;
overflow: hidden;
}
.testimonials-slider {
display: flex;
transition: transform 0.5s ease-in-out;
}
.testimonial {
min-width: 100%;
padding: 40px;
background: white;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
text-align: center;
position: relative;
}
.quote-icon {
font-size: 2.5rem;
color: #ff6b6b;
margin-bottom: 20px;
}
.testimonial-text {
font-size: 1.2rem;
line-height: 1.8;
color: #555;
margin-bottom: 30px;
font-style: italic;
}
.testimonial-author {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
}
.author-image {
width: 70px;
height: 70px;
border-radius: 50%;
object-fit: cover;
border: 3px solid #ff6b6b;
}
.author-info h4 {
font-size: 1.3rem;
color: #333;
margin-bottom: 5px;
}
.author-info p {
color: #777;
font-size: 1rem;
}
.testimonials-nav {
position: absolute;
top: 50%;
width: 100%;
display: flex;
justify-content: space-between;
transform: translateY(-50%);
padding: 0 10px;
}
.testimonials-nav button {
background: #ff6b6b;
border: none;
width: 50px;
height: 50px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.3rem;
color: white;
transition: all 0.3s ease;
}
.testimonials-nav button:hover {
background: #ff5252;
transform: scale(1.1);
}
.testimonials-dots {
display: flex;
justify-content: center;
margin-top: 30px;
gap: 10px;
}
.testimonials-dots .dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.6);
cursor: pointer;
transition: all 0.3s ease;
}
.testimonials-dots .dot.active {
background: white;
transform: scale(1.2);
}
@media (max-width: 768px) {
.testimonial {
padding: 30px 20px;
}
.testimonial-text {
font-size: 1.1rem;
}
.testimonials-nav button {
width: 40px;
height: 40px;
}
}
@media (max-width: 480px) {
.testimonials-section {
padding: 60px 0;
}
.testimonial-author {
flex-direction: column;
}
}
</style>
</head>
<body>
<section class="testimonials-section">
<div class="testimonials-container">
<div class="testimonials-slider" id="testimonialsSlider">
<!-- Testimonial 1 -->
<div class="testimonial">
<div class="quote-icon">
“
</div>
<p class="testimonial-text">
"This service completely transformed our business operations. The team was professional, responsive, and delivered beyond our expectations. Highly recommended!"
</p>
<div class="testimonial-author">
<img src="client1.jpg" alt="Sarah Johnson" class="author-image">
<div class="author-info">
<h4>Sarah Johnson</h4>
<p>CEO, Tech Solutions Inc.</p>
</div>
</div>
</div>
<!-- Testimonial 2 -->
<div class="testimonial">
<div class="quote-icon">
“
</div>
<p class="testimonial-text">
"I was skeptical at first, but the results speak for themselves. Our conversion rates increased by 45% within the first month. Absolutely phenomenal work!"
</p>
<div class="testimonial-author">
<img src="client2.jpg" alt="Michael Chen" class="author-image">
<div class="author-info">
<h4>Michael Chen</h4>
<p>Marketing Director, GrowthLab</p>
</div>
</div>
</div>
<!-- Add more testimonials as needed -->
</div>
<div class="testimonials-nav">
<button id="testimonialPrevBtn">❮</button>
<button id="testimonialNextBtn">❯</button>
</div>
<div class="testimonials-dots" id="testimonialsDots"></div>
</div>
</section>
<script>
document.addEventListener('DOMContentLoaded', function() {
const testimonialsSlider = document.getElementById('testimonialsSlider');
const testimonials = document.querySelectorAll('.testimonial');
const prevBtn = document.getElementById('testimonialPrevBtn');
const nextBtn = document.getElementById('testimonialNextBtn');
const dotsContainer = document.getElementById('testimonialsDots');
let currentTestimonial = 0;
const totalTestimonials = testimonials.length;
// Create dots
testimonials.forEach((_, index) => {
const dot = document.createElement('div');
dot.classList.add('dot');
if (index === 0) dot.classList.add('active');
dot.addEventListener('click', () => goToTestimonial(index));
dotsContainer.appendChild(dot);
});
// Update slider position
function updateTestimonialsSlider() {
testimonialsSlider.style.transform = `translateX(-${currentTestimonial * 100}%)`;
// Update dots
document.querySelectorAll('.dot').forEach((dot, index) => {
dot.classList.toggle('active', index === currentTestimonial);
});
}
// Go to specific testimonial
function goToTestimonial(testimonialIndex) {
currentTestimonial = testimonialIndex;
if (currentTestimonial >= totalTestimonials) currentTestimonial = 0;
if (currentTestimonial < 0) currentTestimonial = totalTestimonials - 1;
updateTestimonialsSlider();
}
// Next testimonial
function nextTestimonial() {
goToTestimonial(currentTestimonial + 1);
}
// Previous testimonial
function prevTestimonial() {
goToTestimonial(currentTestimonial - 1);
}
// Event listeners
prevBtn.addEventListener('click', prevTestimonial);
nextBtn.addEventListener('click', nextTestimonial);
// Auto slide (optional)
// setInterval(nextTestimonial, 5000);
});
</script>
</body>
</html>