How to create a sliding testimonial section using html css
0
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retro-Modern Testimonial Carousel</title>
</head>
<body>
<h1>What Our Customers Say</h1>
<div class="carousel-container">
<button class="nav-btn prev">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M15 18l-6-6 6-6"/>
</svg>
</button>
<div class="carousel">
<div class="testimonial-card active">
<img src="https://i.pravatar.cc/150?img=1" alt="Avatar" class="avatar">
<p class="quote">This product completely transformed my workflow. The retro aesthetic with modern functionality is exactly what I needed.</p>
<h3 class="name">Sarah Johnson</h3>
<p class="role">Creative Director</p>
<div class="stars">★★★★★</div>
</div>
<div class="testimonial-card">
<img src="https://i.pravatar.cc/150?img=3" alt="Avatar" class="avatar">
<p class="quote">I was skeptical at first, but after using it for a week I can't imagine going back. The attention to detail is incredible.</p>
<h3 class="name">Michael Chen</h3>
<p class="role">UX Designer</p>
<div class="stars">★★★★☆</div>
</div>
<div class="testimonial-card">
<img src="https://i.pravatar.cc/150?img=5" alt="Avatar" class="avatar">
<p class="quote">The perfect blend of nostalgia and innovation. It's like my childhood dreams mixed with futuristic tech.</p>
<h3 class="name">Emma Rodriguez</h3>
<p class="role">Developer</p>
<div class="stars">★★★★★</div>
</div>
<div class="testimonial-card">
<img src="https://i.pravatar.cc/150?img=7" alt="Avatar" class="avatar">
<p class="quote">The customer support alone is worth the price. When I had an issue, they responded within minutes with a solution.</p>
<h3 class="name">David Kim</h3>
<p class="role">Product Manager</p>
<div class="stars">★★★★★</div>
</div>
<div class="testimonial-card">
<img src="https://i.pravatar.cc/150?img=9" alt="Avatar" class="avatar">
<p class="quote">I've recommended this to all my colleagues. The retro vibes give it such a unique personality compared to other tools.</p>
<h3 class="name">Lisa Wong</h3>
<p class="role">Art Director</p>
<div class="stars">★★★★☆</div>
</div>
</div>
<button class="nav-btn next">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 18l6-6-6-6"/>
</svg>
</button>
<div class="dots"></div>
</div>
</body>
</html>
CSS provides style to an HTML page. To make the page attractive create a CSS file with the name style.css and remember that you have to make a file with a .css extension.
JavaScript makes the page work functionally. At last, create a JavaScript file with the name of script.js, and remember that you've got to make a file with a .js extension.
Post a Comment
Thank you
Learning robo team