Travel Services With Cards
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>Travel Services</title> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet"> <!-- Font Awesome Icons --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css" integrity="sha512-2SwdPD6INVrV/lHTZbO2nodKhrnDdJK9/kg2XD1r9uGqPo1cUbujc+IYdlYdEErWNu69gVcYgdxlmVmzTWnetw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> <script src="https://kit.fontawesome.com/2f1b6a4d05.js" crossorigin="anonymous"></script> </head> <body> <section class="services-section"> <!-- Left Content --> <div class="services-left"> <h4>Our Services</h4> <h2>Discover the World with Us</h2> <p> Explore breathtaking destinations, luxury stays, and curated travel experiences. Let us make your journey unforgettable with top-class travel services. </p> </div> <!-- Right Content (Cards) --> <div class="services-right"> <div class="service-card"> <i class="fas fa-plane"></i> <h3>Flight Booking</h3> <p>Book affordable and hassle-free flight tickets to any destination worldwide.</p> <button>Read More</button> </div> <div class="service-card"> <i class="fas fa-hotel"></i> <h3>Hotel Stays</h3> <p>Enjoy luxury and comfort with our curated list of top-rated hotels.</p> <button>Read More</button> </div> <div class="service-card"> <i class="fas fa-umbrella-beach"></i> <h3>Holiday Packages</h3> <p>Choose from exotic beaches, mountains, and city getaways with our packages.</p> <button>Read More</button> </div> <div class="service-card"> <i class="fas fa-map-marked-alt"></i> <h3>Guided Tours</h3> <p>Experience guided tours with expert local guides for a memorable journey.</p> <button>Read More</button> </div> </div> </section> </body> </html>
CSS
body { margin: 0; font-family: "Poppins", sans-serif; background: #f7faff; color: #333; } .services-section { padding: 80px 8%; background: linear-gradient(135deg, #00c6ff, #0072ff); color: #fff; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 50px; position: relative; overflow: hidden; } /* Decorative wave */ .services-section::after { content: ""; position: absolute; bottom: -50px; left: 0; width: 100%; height: 120px; background: url("https://svgshare.com/i/uJv.svg") no-repeat center; background-size: cover; } /* Left Content */ .services-left { flex: 1 1 350px; max-width: 420px; z-index: 2; } .services-left h4 { color: #ffeb3b; margin-bottom: 10px; font-size: 16px; font-weight: 600; } .services-left h2 { font-size: 34px; margin-bottom: 20px; line-height: 1.3; } .services-left p { font-size: 15px; color: #f1f1f1; line-height: 1.7; } /* Right Side Cards */ .services-right { flex: 2 1 600px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; z-index: 2; } .service-card { background: #fff; padding: 40px 25px; border-radius: 14px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); text-align: center; transition: all 0.4s ease; opacity: 0; transform: translateY(50px); color: #333; position: relative; overflow: hidden; } .service-card.show { opacity: 1; transform: translateY(0); } .service-card::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(120deg, rgba(0,183,255,0.3), rgba(0,255,198,0.3)); transition: all 0.5s; } .service-card:hover::before { left: 100%; } .service-card:hover { transform: translateY(-12px) scale(1.05); box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18); } .service-card i { font-size: 45px; color: #0072ff; margin-bottom: 18px; background: #e6f3ff; padding: 18px; border-radius: 50%; transition: all 0.3s; } .service-card:hover i { background: #0072ff; color: #fff; } .service-card h3 { font-size: 20px; margin-bottom: 12px; font-weight: 600; } .service-card p { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 25px; } .service-card button { background: #0072ff; border: none; padding: 12px 22px; color: white; font-size: 14px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: background 0.3s, transform 0.2s; } .service-card button:hover { background: #0056cc; transform: scale(1.05); } /* Responsive */ @media (max-width: 900px) { .services-section { flex-direction: column; text-align: center; } .services-left { margin-bottom: 30px; max-width: 100%; } }
JavaScript
const cards = document.querySelectorAll('.service-card'); const observer = new IntersectionObserver(entries => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('show'); } }); }, { threshold: 0.2 }); cards.forEach(card => { observer.observe(card); });
Output Preview
Desktop
Mobile
Fullscreen