Travel Hero Section
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 Hero Section</title> </head> <body> <section class="hero-section"> <div class="hero-container"> <div class="hero-content"> <h1 class="hero-title">Discover Your Next Adventure</h1> <p class="hero-subtitle">Explore breathtaking destinations around the world. From mountain peaks to pristine beaches, create memories that will last a lifetime with our curated travel experiences.</p> <div class="hero-buttons"> <a href="#" class="btn-primary" onclick="alert('Explore Destinations clicked! Ready to start your journey?'); return false;">Explore Destinations</a> <a href="#" class="btn-secondary" onclick="alert('Plan Your Trip clicked! Let\'s create your perfect itinerary.'); return false;">Plan Your Trip</a> </div> </div> <div class="hero-image-container"> <div class="circle-image"> <div class="image-content"> </div> </div> </div> </div> </section> </body> </html>
CSS
body { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; overflow-x: hidden; } .hero-section { min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); position: relative; display: flex; align-items: center; padding: 2rem; overflow: hidden; } .hero-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; width: 100%; z-index: 2; position: relative; } .hero-content { animation: slideInLeft 1s ease-out; } .hero-title { font-size: 3.5rem; font-weight: 800; color: white; line-height: 1.1; margin-bottom: 1.5rem; animation: fadeInUp 1s ease-out 0.3s both; } .hero-subtitle { font-size: 1.25rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 2rem; line-height: 1.6; animation: fadeInUp 1s ease-out 0.6s both; } .hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeInUp 1s ease-out 0.9s both; } .btn-primary { background: #ff6b6b; color: white; padding: 1rem 2rem; border: none; border-radius: 50px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; } .btn-primary:hover { background: #ff5252; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3); } .btn-secondary { background: transparent; color: white; padding: 1rem 2rem; border: 2px solid white; border-radius: 50px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; } .btn-secondary:hover { background: white; color: #667eea; transform: translateY(-2px); } .hero-image-container { display: flex; justify-content: center; align-items: center; position: relative; animation: slideInRight 1s ease-out; } .circle-image { width: 400px; height: 400px; border-radius: 50%; overflow: hidden; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: float 6s ease-in-out infinite; } .circle-image::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.3), transparent); animation: rotate 8s linear infinite; z-index: 1; } .image-content { width: 100%; height: 100%; background: url('https://plus.unsplash.com/premium_photo-1755606533194-a6280b358083?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHx0b3BpYy1mZWVkfDE4fDZzTVZqVExTa2VRfHxlbnwwfHx8fHw%3D') center/cover; position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; font-weight: 600; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); } @keyframes slideInLeft { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateX(0); } } @keyframes slideInRight { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } @keyframes float { 0%, 100% { transform: translateY(0px) rotate(0deg); } 50% { transform: translateY(-20px) rotate(5deg); } } @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes floatAround { 0%, 100% { transform: translateY(0px) translateX(0px); } 25% { transform: translateY(-20px) translateX(10px); } 50% { transform: translateY(-10px) translateX(-15px); } 75% { transform: translateY(-30px) translateX(5px); } } @media (max-width: 768px) { .hero-container { grid-template-columns: 1fr; gap: 2rem; text-align: center; } .hero-title { font-size: 2.5rem; } .hero-subtitle { font-size: 1.1rem; } .circle-image { width: 300px; height: 300px; } .hero-buttons { justify-content: center; } .btn-primary, .btn-secondary { padding: 0.8rem 1.5rem; font-size: 1rem; } } @media (max-width: 480px) { .hero-section { padding: 1rem; } .hero-title { font-size: 2rem; } .circle-image { width: 250px; height: 250px; } .hero-buttons { flex-direction: column; align-items: center; } .btn-primary, .btn-secondary { width: 200px; text-align: center; } }
JavaScript
Output Preview
Desktop
Mobile
Fullscreen